jithavijayan Posted July 28, 2008 Share Posted July 28, 2008 // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); //XML Header header("content-type:text/xml"); Don't know what this code means and where/why to use it. Can someone help? Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/ Share on other sites More sharing options...
MasterACE14 Posted July 28, 2008 Share Posted July 28, 2008 there's alot of different uses and reasons. look up the header(); function in the PHP manual here Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601351 Share on other sites More sharing options...
wildteen88 Posted July 28, 2008 Share Posted July 28, 2008 That code is used to prevent a web browser from caching the requested page. In order to understanding the code, you'll need to read up on HTTP Headers. Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601907 Share on other sites More sharing options...
DarkWater Posted July 28, 2008 Share Posted July 28, 2008 Actually, wildteen, it's not all about that. There's a random XML header in there. =/ Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601910 Share on other sites More sharing options...
wildteen88 Posted July 28, 2008 Share Posted July 28, 2008 Actually, wildteen, it's not all about that. There's a random XML header in there. =/ That just tells the browser what data type to expect, in this case XML. Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601914 Share on other sites More sharing options...
DarkWater Posted July 28, 2008 Share Posted July 28, 2008 I know that, but I didn't think he did. =P I'd hate to see the post about how his thing was being parsed as XML because he threw that line in for cache control. Edit: Yeah, I meant XML instead of HTML. =P Fixed. Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601917 Share on other sites More sharing options...
wildteen88 Posted July 28, 2008 Share Posted July 28, 2008 Thats why I suggested jithavijayan to read up on HTTP Headers, so s/he knew what the commands meant. Quote Link to comment https://forums.phpfreaks.com/topic/116925-php-headers/#findComment-601919 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.