1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

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

Discussion in 'Web Design & Development' started by Nflder, Apr 24, 2010.

Thread Status:
Not open for further replies.
  1. Nflder

    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!!!
     
  2. allnodcoms

    allnodcoms

    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
     
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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/919007

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice