SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: browsers cache

  1. #1
    SitePoint Guru quenting's Avatar
    Join Date
    Dec 2002
    Location
    Switzerland
    Posts
    735
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    browsers cache

    does anyone know of a link or could explain here a detailed effects of the cache directives on browsers ?
    I am using the two directives below on a page:

    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Pragma" content="no-cache" />

    However in IE i still have to refresh the page to get an updated version (not sure about other browsers).
    plus, are those directives supposed to concern html only or also linked documents ? For example does it prevent image/js/css caching or only page caching ? In that case is there a way to prevent image caching ? And in the other case is there a way to have images cached but not the page ?

    Thanks
    Quentin
    The largest message boards on the web !
    unblog.fr, hosting 700000 french blogs

  2. #2
    SitePoint Zealot Tygger2512's Avatar
    Join Date
    Jul 2003
    Location
    Pittsburg, KS
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    Andy.
    Learn the Emotional Freedom Technique at www.as-if-by-magic.com

  3. #3
    SitePoint Guru quenting's Avatar
    Join Date
    Dec 2002
    Location
    Switzerland
    Posts
    735
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for your input, mmm i didn't know about the

    <META HTTP-EQUIV="Expires" CONTENT="-1">

    for IE. He doesn't talk about external files however (typically external css and images).
    I am in the case of a page constantly updated that i want to be reloaded every time, but which contains graphics that i would like to be cached so that my users don't have to download them every time.
    My understanding is that if the page is modified on the server the browser should find out by himself and request the new one (or maybe is it the server who finds out ?), but if the page is php the source code might not be modified and still the content read from a db would be.
    I'll try the expires thing.

    Quentin
    The largest message boards on the web !
    unblog.fr, hosting 700000 french blogs

  4. #4
    SitePoint Addict hurricane.uk's Avatar
    Join Date
    May 2003
    Location
    Liverpool
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE requires you to use the pragma meta twice. Once in the head, and a second time in a second head after the closing </body> tag - you can find out more on this at www.microsoft.com, but basically it's because of file sizes falling below 64kb causing problems wth the tag working in IE.


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
  •