SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    page updated, keep from loading from cache?

    how can you keep a page from loading from the cache every time you update a page? im in the process of creating and updating the entire wvmimaging.com site but every time i view a page i have to shift-reload. im sure any users won't know to do this. and once the site is all up, i'm still going to update. that means the user won't know when they have to shift-reload! there must be some code that automatically downloads the page once it's updated, cuz no other site seems to have this problem

  2. #2
    Skills to Pay the Bills Sparkie's Avatar
    Join Date
    Jul 1999
    Location
    A cave with 47 computers and an internet feed
    Posts
    3,559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This usually cures the problem

    Put this in between your <head></head> tags:

    <meta http-equiv="pragma" content="no-cache">

    Sherice Jacob - Web Improvement Expert
    Improve Website Conversions | eBook Covers
    Follow Me on Twitter!

  3. #3
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm well what does that do? does that make it not load from the cache? cuz thats not what i want. i want it to only not load from the cache if there has been an update.

  4. #4
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The tag stops your page from being saved to the cache, so when a user visits that page the next time he/she will only see the newest content.

    I think it means that it'll load at the same rate everytime (instead of faster because of images already stored).

    I don't think you'll be able to do some 'custom' caching.

    Hope that helps?!

  5. #5
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay well thats not gonna help... sorry =(
    you see, there's no way that im the only site on the web having this problem. when sitepoint updates their links or their articles or whatever, how does everyone's browser know to update their cache? there must be a way. there's no way its only my site with the problem.

  6. #6
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might just be your browser settings. If you're using IE, go to Tools -> Internet Options -> Temporary Files -> Settings. Which box is checked under "Check for new versions of stored pages?"?

    Usually, if a browser has a page cached, it will send an HTTP request like this:

    GET /page.html HTTP/1.1
    If-Modified-Since: 17 Mar 2001 13:01:59

    If the server detects that the last modification of page.html was before or on the date specified in the I-M-S header, it will send the "304 not modified" response code to the browser. That tells it to use the copy it has stored on the HD.

    It sounds like it's just a problem with your browser....

  7. #7
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm yeah i switched it thanks. same thing was on my client's computer and he uses netscape... hmm

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    San Jose, California
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at this thread:
    http://www.sitepointforums.com/showt...threadid=27085
    Never mind, seems you've solved your problem.
    the judge
    Last edited by the judge; Jul 9, 2001 at 22:15.

  9. #9
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    An alternative

    On each web page you design and modify add the following

    <META HTTP-EQUIV="Expires" CONTENT="Thu, 01 Feb 2001 00:59:00 GMT">

    in your <head> section. Change the Content= date when you modify the date. If the date has past for the browser of your viewer, it will not display the cache but download the new page.

    The EXPIRES descriptor specifies the date and time after which the document should be considered expired. Controls cacheing in HTTP/1.0. In Netscape Navigator, a request for a document whose expires time has passed will generate a new network request (possibly with If-Modified-Since). An illegal Expires date, e.g. "0", is interpreted as "now". Setting Expires to 0 may thus be used to force a modification check at each visit.

    NOTICE: Web robots may delete expired documents from a search engine, or schedule a revisit.

    Dates must be given in RFC850 ( http://www.alternic.org/rfcs/rfc800/rfc850.txt ) format, in GMT. E.g. (META tag):

    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">

    or (HTTP header):
    Expires: Wed, 26 Feb 1997 08:21:57 GMT

    In HTTP 1.0, an invalid value (such as "0") may be used to mean "immediately".

    Note: While the Expires HTML META tag appears to work properly with Netscape Navigator, other browsers may ignore it, and it is ignored by Web proxies. Use of the equivalent HTTP header, as supported by e.g. Apache, is more reliable.

    See also http://vancouver-webpages.com/CacheNow/ for discussion about cache control, page expiry, etc.


    In God We Trust


Bookmarks

Posting Permissions

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