Setting Expire header for php page - Php

Expire header

Snippet Code


  
Rate this page :
  [ 0 votes]

Add this code in top of your php page

$expires = 60*60*24*14; header("Pragma: public"); header("Cache-Control: maxage=".$expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time() $expires) . ' GMT');

Tags


Ask Questions

Ask Question