PHP Set Expire Header Re-validation

PHP & CSS Must Validate Function Example

The below code written in PHP embedded with CSS is to set the Header revalidation time for web page contents. Set Expire Header is the cache control which which will let your web page faster download on web browsers. Such header validation tell the browser at which frequency the the specified web page should be cached

Set Expire Header for Cache Control Validation


<?php
ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>



Related Topic Set up expire header in apache using htaccess file
Setting Expire Header for PHP pages
What is Ip Address Spoofing
What is Redirection and their Types
How to get the HTTP Cookie Value
PHP  CSS  web design  

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback