Jump to content

PHP header() function not working


HAcland

Recommended Posts

Hi,

 

I have the following :

<?php
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>
<link rel="stylesheet" media="all" type="text/css" href="boat.css" />

</head>

<body>

 

I am running Apache. The php page is actually a joomla wrapper. My problem is that the header function is not working and the page is still caching in IE7. Am I putting the header function in the wrong place? or must i configure Apache to work witht the function. Any help much appreciated.

Link to comment
https://forums.phpfreaks.com/topic/78084-php-header-function-not-working/
Share on other sites

add must-revalidate to your header, maybe it would work however your caching is dependent on your browser setting if the browser is set to cache a page it will override your setting

 

header("Cache-Control: no-cache, must-revalidate"); 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.