View Full Version : Javascript problem

09-06-2004, 12:24 PM
I use a number of javascript 'include' files on my site. For example I have a disclaimer that shows on all pages so I wrote it in one js file and reference it on all pages with the following.

<SCRIPT language="javascript" src="http://www.utahaa.org/disclaim.js" type="text/javascript"></SCRIPT>

Here's the problem. I modified this file yesterday and posted it, as I've successfully done in the past. It still showed the old disclaim.js information!

I ended up deleting the file and naming it before it would show the new changes.

Has anyone ran into this before?

09-06-2004, 02:02 PM
Yep I think it means your browser was using the cached version of the file instead of the new one that was uploaded. It is that or like me the new file was not actually getting uploaded. I have spent some time in the past trying to figure out why my changes have not taken only to realize that I had not yet saved the new file on my local machine to upload thus was simply uploading the old one. :)

I have never really been able to figure out why my browser was using the cached version since it is nota consistent thing that happens. Using Ctrl Refresh some times helps although deleteing the file and then uploading it can do it also as you found.

09-06-2004, 02:36 PM
Nope. I understand the caching problem. Hitting F5 repeatedly did not solve it.

Tech support suggested the same thing, about the file not being posted or being posted in the wrong area. To prove that it was posted I went to the site manager and then file manager. The new include js file was there. But it still showed the old one in the pages that referenced it.


09-06-2004, 02:55 PM
Tech support just got back with me again. Here's there response:

As far as we're aware this issue is not common place to Javascript files, but actually is a common occurrence that has to do with the DNS Caching with the ISP's Name Server. Not sure what exactly causes it, but if it happens again just do the workaround of removing the file and then re uploading it.

That makes sense to me.