Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Uploading Problems

Status
Not open for further replies.

eadevelopment

Programmer
Jul 25, 2003
2
GB
Hi, i have a very strange problem.

I have a website, and when i make changes to the web files i upload them via FTP. Then i can go to the website and see the updated pages.

However, for whatever reason, if i make changes to a javascript file, then upload it, the changes won't be made.
For example, i upload a file 'validate.js'. According to the file stats in ftp, the last modified date gets changed. if i download the file again, it isn't the file i uploaded but an older version.

Another thing. if i type the directory where the file is in th url, it shows me the directory listing correctly, with the correct file modified date, but if i download from here it is also downloading the older copy. in fact, even if i delete the file 'validate.js' from this directory, it doesn't appear in the directory listing but i can still download it by typing the url.
E.G.

i type:
it then lists 5 javascript files, one of which is 'validate.js'.

i delete validate.js via ftp. i go back to:

now, there in no 'validate.js'
but, if i type:

then it downloads successfully. and if i make some changes to the file and upload it, typing the above url shows the file has been modified, but when downloading, it will download only the older version.

Is the server caching javascript files somewhere?

Thanks in advance, in know this was a long description.

Laters,
Etch!
 
Hi,

have you tried pressing the "refresh"-button in your browser?

Greetings

--
Smash your head on keyboard to continue...
 
Of course, that would be obvious. clearing cache is first thing to do.
Remember, i said that other files have their changes reflected instantly. for some reason, javascript files don't (or this particular javascript file).
Besides, it shouldn't be possible to download a file that doesnt exist on the server.

Im just wondering if there is any apache expert out there who can tell me whether certain server files get cached somewhere, so even when the directory is changed, the original files are still in the cache?

Totally baffling me, why .js files
 
Do you have control of the web server?
Apache has the ability to alias directories or url paths.

if you have the ability, look in the httpd.conf file for the string javascripts and see if it is aliased. IF it is, then it is probably pointing to somewhere else in the directory structure, then if you have access to that directory change/delete the .js file there.
 
eadevelopment,

There is an Apache group on Tek-Tips. Have you checked there?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top