Thread: Cache

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

    Join Date
    Feb 2000
    Posts
    16
    Rep Power
    0
    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.

    Thanks,
    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
    Location
    Helden,Limburg,The Netherlands
    Posts
    33
    Rep Power
    15
    Hi,

    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:
    DocumentURL?time=123456

    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!

    Greetz,
    Ramon



    ------------------
    Ramon Litjens
    Boradoli Web Design
    (www.boradoli.nl)

Similar Threads

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

IMN logo majestic logo threadwatch logo seochat tools logo