Thread: Cache

  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    I can't seem to get any browser to stop caching things.

    I've tried it with the following PHP.

    header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
    header ("Cache-Control: no-cache, must-revalidate");
    header ("Pragma: no-cache"); ?>

    and with the following HTML

    <META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">

    And It just keeps caching.

    Does anyone know how to make a browser not cache your content.

    I usually don't get frustrated but this is making me go bald.

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Helden,Limburg,The Netherlands
    Rep Power

    If it is not the start page of your site you can use some header info to make the browser load the document every time.

    You can use the current time in miliseconds from 1970 for instance. Since this makes a different URL every milisecond the browser does not take the document out of the cache.

    It looks a little like this:

    The problem is that when someone enters the page from a bookmark or search engine, the document can still come from the cache. And it is not useful to do this when the document is the starting page. Although you could use some meta refresh function to accomplish the same thing. Anyhow you get the idea!


    Ramon Litjens
    Boradoli Web Design

Similar Threads

  1. Delete file from browser cache
    By CEO in forum Perl Programming
    Replies: 2
    Last Post: January 12th, 2004, 07:57 AM
  2. cache cache why wont you go away
    By loserqeek in forum Flash Help
    Replies: 5
    Last Post: July 21st, 2003, 09:11 PM
  3. Clearing Browser cache
    By wol in forum Security and Cryptography
    Replies: 1
    Last Post: June 29th, 2003, 04:19 PM
  4. cache issue
    By alshawver in forum HTML Programming
    Replies: 6
    Last Post: November 28th, 2001, 10:23 AM
  5. DNS/Linuxconf
    By Lord MJ in forum Apache Development
    Replies: 11
    Last Post: September 25th, 2001, 06:44 PM

IMN logo majestic logo threadwatch logo seochat tools logo