Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Please help me limit caching

Reply
Thread Tools

Please help me limit caching

 
 
James Dow Allen
Guest
Posts: n/a
 
      10-08-2012
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
 
Reply With Quote
 
 
 
 
Hot-Text
Guest
Posts: n/a
 
      10-08-2012
"James Dow Allen" <> wrote in message news:13c137d4-5541-4362-8eaa-...
> 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
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-08-2012
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%3A%2F%2Ffabpedigree.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/
 
Reply With Quote
 
Hot-Text
Guest
Posts: n/a
 
      10-08-2012
"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%3A%2F%2Ffabpedigree.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?grou...pport.helpdesk

 
Reply With Quote
 
James Dow Allen
Guest
Posts: n/a
 
      10-08-2012
On Oct 8, 3:59*pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> 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
 
Reply With Quote
 
Hot-Text
Guest
Posts: n/a
 
      10-08-2012


"James Dow Allen" <> wrote in message news:4d6b935f-df00-43b5-937b-...
> On Oct 8, 3:59 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable page caching without disabling caching of jpegs andstylesheets etc JimLad ASP .Net 3 01-21-2010 10:13 AM
Some shareware has a time limit and the software will not work after the time limit has expired. anthony crowder Computer Support 20 01-16-2007 10:01 AM
c program, file size limit, how to solve? 2G bytes limit. guru.slt@gmail.com C++ 1 06-27-2005 11:05 PM
Fragment Caching inside page caching? Troy Simpson ASP .Net 0 01-19-2004 11:57 AM
trouble with caching or caching the trouble Hypo ASP .Net 6 08-01-2003 07:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57