Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

http header modification for browser side cache


asgar

Recommended Posts

Hello, we are new in this forum but using osCommerce for a very long time. We need help in successfully implementing the browser side caching using http headers. But while adding the following code we found that http header output is still showing the old value.

 

<?php
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpStr);
?>

 

And the http header output is as follows which is not changing after adding the above code.

 

Status: HTTP/1.1 200 OK
Date: Tue, 22 Jan 2013 13:59:13 GMT
Server: Apache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Set-Cookie: osCsid=vmnnnq6bc9bbc21leglj52pql7; path=/; domain=www.xxxxx.com
Pragma: no-cache
X-Powered-By: PleskLin
MS-Author-Via: DAV
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

Later we found that there are two files where we can find this expiry date and those files are /includes/classes/sessions.php and in /admin/includes/classes/sessions.php. We changed the date of expiry but the outcome remains the same.

 

We need help to implement the browser caching.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...