PDA

View Full Version : Leverage Browser Caching - Do People Use This?



keyon
10-19-2011, 01:48 PM
So I've been testing my site with the Page Speed plugin for Firefox, and all my pages are flagged for not using "leverage browser caching."
I guess I thought browsers did this automatically (especially with images) where a browser first looks for web page components that might be stored locally (from a previous visit), instead of calling a new copy every time from the server.

But when I read more about the subject (at code.google), they're talking about putting some type of header code in the pages.

Anyone have experience with this? I'm a little puzzled because, first, I thought browser caching was something controlled by the user (browser internet options), not head tags in the web page. Can one override the other?

deepsand
10-19-2011, 11:23 PM
The time-to-live, which determines for how long the local cache copy is deemed to be usable, is controlled, not by the browser, but by the developer.

Those browsers which provide for user settings re. such do not alter such time, but only whether or not it is observed. E.g., the available user settings may be:

Always request a fresh copy;
Never request a fresh copy;
Request a fresh copy only when browser is started; or,
Automatically request as needed per the page's time-to-live,

with the default setting being the "automatic" one.

keyon
10-20-2011, 10:36 AM
Automatically request as needed per the page's time-to-live
Great, thanks. That makes sense.