Discussion:
Dynamic pages and caching
(too old to reply)
g***@cyberdude.com
2019-08-09 07:58:16 UTC
Permalink
I was just shopping groceries on a site. I searched "potato" on it and got a list of results. Then I went to some other page. *Then* I happened to click the Back button. Firefox showed me a "We need to resend your query to the server"...blah blah. What does this mean??? Can Firefox tell the difference between a static page and a dynamic one? What is the relationship between dynamic pages and caching exactly? If a page is dynamic, does that automatically MEAN that the server needs to be hit every time it's fetched? (doesn't APPEAR to be the case - there are other sites which do not show this behaviour).
I suspect what happened was that these guys turned OFF the cache totally for that page - like, why?? :) Are there going to be 2000 different varieties of potatoes being added to the site/sec?? :) If you were the site maker, is there some way to turn off caching ONLY FOR DYNAMIC PAGES, somehow?? - just out of curiosity?? How?? (nasty Apache conf file fiddling, right?? :( )


Thanks.
Robert Wessel
2019-08-09 10:12:11 UTC
Permalink
Post by g***@cyberdude.com
I was just shopping groceries on a site. I searched "potato" on it and got a list of results. Then I went to some other page. *Then* I happened to click the Back button. Firefox showed me a "We need to resend your query to the server"...blah blah. What does this mean??? Can Firefox tell the difference between a static page and a dynamic one? What is the relationship between dynamic pages and caching exactly? If a page is dynamic, does that automatically MEAN that the server needs to be hit every time it's fetched? (doesn't APPEAR to be the case - there are other sites which do not show this behaviour).
I suspect what happened was that these guys turned OFF the cache totally for that page - like, why?? :) Are there going to be 2000 different varieties of potatoes being added to the site/sec?? :) If you were the site maker, is there some way to turn off caching ONLY FOR DYNAMIC PAGES, somehow?? - just out of curiosity?? How?? (nasty Apache conf file fiddling, right?? :( )
If I understand your question correctly, this is the result of a web
page using a POST (as opposed to GET) HTTP request. Unlike GETs,
POSTs may impact state on the server, so cannot be safely (re)sent -
that's what the browser is warning you about. Usually called a
"postback".
Robert Wessel
2019-08-09 10:18:42 UTC
Permalink
On Fri, 09 Aug 2019 05:12:11 -0500, Robert Wessel
Post by Robert Wessel
Post by g***@cyberdude.com
I was just shopping groceries on a site. I searched "potato" on it and got a list of results. Then I went to some other page. *Then* I happened to click the Back button. Firefox showed me a "We need to resend your query to the server"...blah blah. What does this mean??? Can Firefox tell the difference between a static page and a dynamic one? What is the relationship between dynamic pages and caching exactly? If a page is dynamic, does that automatically MEAN that the server needs to be hit every time it's fetched? (doesn't APPEAR to be the case - there are other sites which do not show this behaviour).
I suspect what happened was that these guys turned OFF the cache totally for that page - like, why?? :) Are there going to be 2000 different varieties of potatoes being added to the site/sec?? :) If you were the site maker, is there some way to turn off caching ONLY FOR DYNAMIC PAGES, somehow?? - just out of curiosity?? How?? (nasty Apache conf file fiddling, right?? :( )
If I understand your question correctly, this is the result of a web
page using a POST (as opposed to GET) HTTP request. Unlike GETs,
POSTs may impact state on the server, so cannot be safely (re)sent -
that's what the browser is warning you about. Usually called a
"postback".
As to caching, it can be controlled on a per-page basis with the
Cache-Control parameter, although it doesn't directly prevent caching,
it is supposed to make the browser use one of the "If-" parameters to
validate the page - but that doesn't usually result in the "need to
resend" message.
Barry Margolin
2019-08-12 04:54:24 UTC
Permalink
Post by Robert Wessel
On Fri, 09 Aug 2019 05:12:11 -0500, Robert Wessel
Post by Robert Wessel
Post by g***@cyberdude.com
I was just shopping groceries on a site. I searched "potato" on it and got
a list of results. Then I went to some other page. *Then* I happened to
click the Back button. Firefox showed me a "We need to resend your query to
the server"...blah blah. What does this mean??? Can Firefox tell the
difference between a static page and a dynamic one? What is the
relationship between dynamic pages and caching exactly? If a page is
dynamic, does that automatically MEAN that the server needs to be hit every
time it's fetched? (doesn't APPEAR to be the case - there are other sites
which do not show this behaviour).
I suspect what happened was that these guys turned OFF the cache totally
for that page - like, why?? :) Are there going to be 2000 different
varieties of potatoes being added to the site/sec?? :) If you were the site
maker, is there some way to turn off caching ONLY FOR DYNAMIC PAGES,
somehow?? - just out of curiosity?? How?? (nasty Apache conf file fiddling,
right?? :( )
If I understand your question correctly, this is the result of a web
page using a POST (as opposed to GET) HTTP request. Unlike GETs,
POSTs may impact state on the server, so cannot be safely (re)sent -
that's what the browser is warning you about. Usually called a
"postback".
As to caching, it can be controlled on a per-page basis with the
Cache-Control parameter, although it doesn't directly prevent caching,
it is supposed to make the browser use one of the "If-" parameters to
validate the page - but that doesn't usually result in the "need to
resend" message.
But browsers never cache the result of a POST, AFAIK, so cache control
is irrelevant there.
--
Barry Margolin
Arlington, MA
Robert Wessel
2019-08-12 20:10:16 UTC
Permalink
On Mon, 12 Aug 2019 00:54:24 -0400, Barry Margolin
Post by Barry Margolin
Post by Robert Wessel
On Fri, 09 Aug 2019 05:12:11 -0500, Robert Wessel
Post by Robert Wessel
Post by g***@cyberdude.com
I was just shopping groceries on a site. I searched "potato" on it and got
a list of results. Then I went to some other page. *Then* I happened to
click the Back button. Firefox showed me a "We need to resend your query to
the server"...blah blah. What does this mean??? Can Firefox tell the
difference between a static page and a dynamic one? What is the
relationship between dynamic pages and caching exactly? If a page is
dynamic, does that automatically MEAN that the server needs to be hit every
time it's fetched? (doesn't APPEAR to be the case - there are other sites
which do not show this behaviour).
I suspect what happened was that these guys turned OFF the cache totally
for that page - like, why?? :) Are there going to be 2000 different
varieties of potatoes being added to the site/sec?? :) If you were the site
maker, is there some way to turn off caching ONLY FOR DYNAMIC PAGES,
somehow?? - just out of curiosity?? How?? (nasty Apache conf file fiddling,
right?? :( )
If I understand your question correctly, this is the result of a web
page using a POST (as opposed to GET) HTTP request. Unlike GETs,
POSTs may impact state on the server, so cannot be safely (re)sent -
that's what the browser is warning you about. Usually called a
"postback".
As to caching, it can be controlled on a per-page basis with the
Cache-Control parameter, although it doesn't directly prevent caching,
it is supposed to make the browser use one of the "If-" parameters to
validate the page - but that doesn't usually result in the "need to
resend" message.
But browsers never cache the result of a POST, AFAIK, so cache control
is irrelevant there.
I was unclear. The OP was really asking two different questions, or
at least speculating on the answer to their first. POST responses
don't get cached (and are likely the cause of the effect the OP is
asking about), caching of GET responses can be controlled.

Loading...