Jump to content

cache


mistakes!

Recommended Posts

hello. i know this headers are for caching control henceb the browser is not allowed to cache the pages locally

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

apart from that what else does it do for me? how does ot make my programme better?
Link to comment
Share on other sites

[!--quoteo(post=372433:date=May 8 2006, 06:09 PM:name=mistakes!)--][div class=\'quotetop\']QUOTE(mistakes! @ May 8 2006, 06:09 PM) [snapback]372433[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hello. i know this headers are for caching control henceb the browser is not allowed to cache the pages locally

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

apart from that what else does it do for me? how does ot make my programme better?
[/quote]

It depends on wether you want the page cached or not. If it is a page that updates frequently then you probably would want those headers.

Those headers are just preventing cache by setting the cache expiration to an obviously past tense date. They all work together to basically do the same thing

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); //SET EXPIRATION

header('Cache-Control: no-store, no-cache, must-revalidate'); // TELLS BROWSER THAT IF CACHED IT SHOULDN'T USE IT

header('Cache-Control: post-check=0, pre-check=0', FALSE); //NULLIFIES RAW DATA

header('Pragma: no-cache'); //GENERALLY FOR CROSS BROWSER COMPATIBILITY
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.