How do I get browsers to load revised files instead of the ones on my computer?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Nflder

Thread Starter
Joined
Aug 21, 2003
Messages
295
I have always used Ctrl/Enter to force browsers to load an edited page instead of the one on my computer. I am find it increasingly difficult to get either FireFox or IE to load newer files. It is especially difficult with script files. I have even deleted files on the server and forced the browser to produce an error - file not found, then uploaded the file and the browser still loaded the older file, presumably the one on my computer.

This is really irritating and I'm sure its just something I'm overlooking... Help!!!
 
Joined
Jun 30, 2007
Messages
613
The answer is to ask the browser not to cache your pages, this forces them to reload from the remote, server side copy.
This is a good start:

Code:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="expires" content="-1" />
<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate">
The first two work for FF & IE, the third is for Safari. There is one more thing with Safari though, as I found out after two days of wondering why my back button would take me back to a page where the user had logged out and the session had been closed. Safari doesn't close a page when you navigate away, it buffers it - putting it on hold if you like. When you go back to it using the history, Safari just resumes it, so no onLoad event gets called, bypassing a fair bit of validation. The way around this is to utilise the onUnload event. You don't need to do anything in it, just acknowledge it. I call an empty function called 'doZip()' and that seems to work fine.

Hope that helps...

Danny

Here's the original post
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top