X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   page headers (https://forum.x-cart.com/showthread.php?t=18354)

cotc2001 12-02-2005 04:39 AM

page headers
 
Hi there does anyone know how to do this, just got some advice on my site about changing page headers but not sure how to do this (it might even be a server config)

Quote:

If I were you I'd look at changing the Expires: portion of your page header response. At the moment it read 'Expires: Mon, 26 Jul 1997 05:00:00 GMT'.
If you want a browser to retreive a new copy everytime visited you should set it to '-1' rather than a backward dated timestamp.

hooter 12-02-2005 05:21 AM

Hi cotc,

Yes that would be some sort of default server config behavior as the "Expires" meta information isn't fed by xcart. You can probably override that output by editing your /skin1/meta.tpl and putting in your own "Expire" meta information tags.

cotc2001 12-02-2005 06:01 AM

Hmm just checked with our host and they said it wasnt the server it was the code (doesn't surprise me that they said that)

I entered the expire information into the meta.tpl but it didn't have any effect at all :(

hooter 12-02-2005 07:11 AM

Hi cotc,

Just visited your site and in viewing the source am in fact seeing the new "Expire" meta tag:
Code:

<META HTTP-EQUIV="expires" content="-1">

This is what you intended right 8)

Make sure you refresh browser or force it to reload not from cache by doing CTRL F5 :wink:

cotc2001 12-02-2005 07:13 AM

Not its definatley a server problem, although the code is in there the server is orverriding it. i.e if you goto
http://www.seoconsultants.com/tools/headers.asp

and enter http://www.justhom.com and click on check server headers and then have a look at the "expires:" it still show the back date as if the meta was not in there.

im talking to my host about fixing it (their first reaction was that its the x-cart code) 8O

cotc2001 12-06-2005 12:18 AM

Ok sorted.
All that needed doing is that on .php pages like home.php , product.php etc.

after
Code:

require "./auth.php";

I added

Code:

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: public");
header("Expires: -1");


seems to have done the trick now :D


All times are GMT -8. The time now is 06:08 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.