Please help me limit caching

Discussion in 'HTML' started by James Dow Allen, Oct 8, 2012.

  1. I have my own hobby website
    http://fabpedigree.com
    Most of the pages change about once per month.
    When I access it myself with Firefox I often get old versions.
    (I can click Refresh, of course, if I notice this,
    but I worry about others accessing the site; they'd have
    the same problem but not even know it.)
    I realize I can add a 'NO-CACHE' directive on each page,
    or in a .htaccess file, but that seems like overkill.
    I don't want to degrade access speed. It would be
    inconvenient to add EXPIRES directives to the html
    pages, as I don't know in advance when the page will
    be obsoleted.

    I wish there were a .htaccess or html directive like
    "Don't keep any cached pages for more than a week."
    How do others handle this issue?

    My ignorance of html, etc., is rather thorough, so any comments
    on elementary ideas I'm overlooking are welcome.

    James Dow Allen
     
    James Dow Allen, Oct 8, 2012
    #1
    1. Advertising

  2. James Dow Allen

    Hot-Text Guest

    "James Dow Allen" <> wrote in message news:...
    > I have my own hobby website
    > http://fabpedigree.com
    > Most of the pages change about once per month.
    > When I access it myself with Firefox I often get old versions.
    > (I can click Refresh, of course, if I notice this,
    > but I worry about others accessing the site; they'd have
    > the same problem but not even know it.)
    > I realize I can add a 'NO-CACHE' directive on each page,
    > or in a .htaccess file, but that seems like overkill.
    > I don't want to degrade access speed. It would be
    > inconvenient to add EXPIRES directives to the html
    > pages, as I don't know in advance when the page will
    > be obsoleted.
    >
    > I wish there were a .htaccess or html directive like
    > "Don't keep any cached pages for more than a week."
    > How do others handle this issue?
    >
    > My ignorance of html, etc., is rather thorough, so any comments
    > on elementary ideas I'm overlooking are welcome.
    >
    > James Dow Allen


    Pass on:: IE8SP2
    Pass on:: Sarfari 5.1.6
    Pass on:: Opera/9.80
    Pass on:: FireFox 10.2
    pass on:: Mozilla 1.7.2
     
    Hot-Text, Oct 8, 2012
    #2
    1. Advertising

  3. 2012-10-08 10:02, James Dow Allen wrote:

    > I have my own hobby website
    > http://fabpedigree.com
    > Most of the pages change about once per month.


    Check out
    http://redbot.org/?uri=http://fabpedigree.com
    for a quick cacheability analysis. Browsers will make their own
    analysis, mainly based on the Last-Modified header.

    > When I access it myself with Firefox I often get old versions.


    This is a common fallacy among authors. At present, when Last-Modified
    means that the page was modified a few days ago, browsers probably treat
    it as cacheable for some minutes, or maybe a few hours. Now, as an
    author, you may have opened the page in a browser, perhaps closed the
    browser, edited the page, and then open it again. The browser will use
    the cached copy, for apparent reasons. What are the odds that this
    happens to a casual surfer?

    > It would be
    > inconvenient to add EXPIRES directives to the html
    > pages, as I don't know in advance when the page will
    > be obsoleted.


    EXPIRES means that the cached copy will be treated as stale. This is
    something you do on the basis of estimates and guesses, not exact
    computation of the future.

    > I wish there were a .htaccess or html directive like
    > "Don't keep any cached pages for more than a week."


    There are no directives in HTML.

    But there is such a directive in Apache, see
    http://httpd.apache.org/docs/2.2/mod/mod_expires.html
    By setting
    ExpiresByType text/html "access plus 7 days"
    you are effectively imposing an upper limit on the lifetime of a cached
    copy of any HTML document.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Oct 8, 2012
    #3
  4. James Dow Allen

    Hot-Text Guest

    "Jukka K. Korpela" <> wrote in message news:k4u4ll$ec8$...
    > 2012-10-08 10:02, James Dow Allen wrote:
    >
    >> I have my own hobby website
    >> http://fabpedigree.com
    >> Most of the pages change about once per month.

    >
    > Check out
    > http://redbot.org/?uri=http://fabpedigree.com
    > for a quick cacheability analysis. Browsers will make their own
    > analysis, mainly based on the Last-Modified header.
    >
    > > When I access it myself with Firefox I often get old versions.

    >
    > This is a common fallacy among authors. At present, when Last-Modified
    > means that the page was modified a few days ago, browsers probably treat
    > it as cacheable for some minutes, or maybe a few hours. Now, as an
    > author, you may have opened the page in a browser, perhaps closed the
    > browser, edited the page, and then open it again. The browser will use
    > the cached copy, for apparent reasons. What are the odds that this
    > happens to a casual surfer?
    >
    >> It would be
    >> inconvenient to add EXPIRES directives to the html
    >> pages, as I don't know in advance when the page will
    >> be obsoleted.

    >
    > EXPIRES means that the cached copy will be treated as stale. This is
    > something you do on the basis of estimates and guesses, not exact
    > computation of the future.
    >
    >> I wish there were a .htaccess or html directive like
    >> "Don't keep any cached pages for more than a week."

    >
    > There are no directives in HTML.
    >
    > But there is such a directive in Apache, see
    > http://httpd.apache.org/docs/2.2/mod/mod_expires.html
    > By setting
    > ExpiresByType text/html "access plus 7 days"
    > you are effectively imposing an upper limit on the lifetime of a cached
    > copy of any HTML document.
    >


    Good answer with good Info..........


    --
    http://mynews.ath.cx/thread.php?group=24hoursupport.helpdesk
     
    Hot-Text, Oct 8, 2012
    #4
  5. On Oct 8, 3:59 pm, "Jukka K. Korpela" <> wrote:
    > ExpiresByType text/html "access plus 7 days"


    Thank you muchly. This is exactly what I was looking for!
    (I'm going with "3 days" instead of 7.)

    I see lots of Google hits for "ExpiresByType" but no mention
    of this option if I Google ".htaccess tutorial" or such.

    This is the 2nd or 3rd time I've had quick useful responses
    here for my website questions. Maybe I should visit here
    more often. :)

    James
     
    James Dow Allen, Oct 8, 2012
    #5
  6. James Dow Allen

    Hot-Text Guest

    "James Dow Allen" <> wrote in message news:...
    > On Oct 8, 3:59 pm, "Jukka K. Korpela" <> wrote:
    >> ExpiresByType text/html "access plus 7 days"

    >
    > Thank you muchly. This is exactly what I was looking for!
    > (I'm going with "3 days" instead of 7.)
    >
    > I see lots of Google hits for "ExpiresByType" but no mention
    > of this option if I Google ".htaccess tutorial" or such.
    >
    > This is the 2nd or 3rd time I've had quick useful responses
    > here for my website questions. Maybe I should visit here
    > more often. :)
    >
    > James


    Good to see your questions.
    If the Answer was not HTML,
    Then it have to bing.com Hot-Text.

    --
    ...
    http://mynews.ath.cx/thread.php?group=alt.html
     
    Hot-Text, Oct 8, 2012
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hypo
    Replies:
    6
    Views:
    424
  2. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    806
    Troy Simpson
    Jan 19, 2004
  3. KK
    Replies:
    2
    Views:
    597
    Big Brian
    Oct 14, 2003
  4. Replies:
    1
    Views:
    1,089
    Victor Bazarov
    Jun 28, 2005
  5. JimLad
    Replies:
    3
    Views:
    926
    JimLad
    Jan 21, 2010
Loading...

Share This Page