Submit Your Article Forum Rules

Results 1 to 3 of 3

Thread: How can I force browsers to auto refresh ?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2004
    Posts
    5

    How can I force browsers to auto refresh ?

    Hi Forum

    My website content changes frequently and I am concerned that many of my visitors are not seeing the updated content because their browsers are using a cached image.

    Is there a way to force browsers to auto refresh when they visit your site - so the visitor is getting the latest content every time ?

    Charles

  2. #2
    Senior Member paulhiles's Avatar
    Join Date
    Jul 2003
    Posts
    2,073
    Try adding the following meta tags to the head section of your page's code.
    This will help prevent caching of the page.

    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="Expires" content="-1">


    NB: The -1 setting for the page expiry works for Internet Explorer, but other browsers will ignore it. I'm reliably informed that replacing the -1 with a real date from the past will work more effectively. As illustrated below:

    <meta http-equiv="expires" content="Wed, 21 Aug 1996 12:15:39 GMT">

    Some sites also use the Pragma no-cache tag, however this doesn't work for IE 5 browsers, with the result that headers are often filled with a combination of the different metatags in the hope that one of them is going to work! :o)

    Remember, that the purpose of the browser's cache is to speed up the response on revisiting the server, so if you have a heavy download on your site's page, this may marginally impair performance.

    Hope that helps,

    Paul

    PS. Here are some additional links for further reading:

    Caching Tutorial for Web Authors and Webmasters
    http://www.web-caching.com/mnot_tutorial/

    HOWTO: Prevent Caching in Internet Explorer
    http://support.microsoft.com/default...b;EN-US;234067

    "Pragma: No-cache" Tag May Not Prevent Page from Being Cached
    http://support.microsoft.com/default...b;EN-US;222064

  3. #3
    Senior Member carju1's Avatar
    Join Date
    Jul 2003
    Posts
    653
    Paul's right that's about all you can do (I always add the Pragma <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"> tag as well).

    However I know from experience that it still won't be enough with the worst offenders for cache delvery being corporate connections rather than normal ISP's.

    On at least one Motorsports site I was doing I found that the corporate client themselves were getting cached pages and as it was being updated with race reports every 15 minuteds I ended up putting a time stamp on the page and telling users if the time stamp was more than 30 minutes old to manually refresh their browser (And sometimes systems would still provide cached pages even on a F5 request)

    Charles if you are renewing content on a very regular basis make sure you tell people this on your home page every little helps.

    Regards

    Julian

Similar Threads

  1. Meta refresh for refresh content
    By rupalis in forum Search Engine Optimization Forum
    Replies: 0
    Last Post: 09-05-2005, 03:42 AM
  2. Idea's for Auto Free Finders online auto mall?
    By Dougster in forum Marketing Strategies Discussion Forum
    Replies: 1
    Last Post: 12-17-2004, 07:28 AM
  3. How do I force the page to refresh from the server?
    By zwickes in forum Web Programming Discussion Forum
    Replies: 2
    Last Post: 11-21-2004, 12:34 PM
  4. MSN Refresh?
    By CraigAllen in forum MSN Search Discussion Forum
    Replies: 2
    Last Post: 11-08-2004, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •