Page 1 of 1

php header

Posted: Sun Aug 23, 2015 8:05 pm
by Vegan
2 items for the header, not sure which should be first or does it matter?

Code: Select all


<?php
 Header("Cache-Control: must-revalidate");
 $offset = 60 * 60 * 24 * 7;
 $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
 Header($ExpStr);
?>
<!-- ETag allows a search engine the ability to identify page changes easily -->
<?php header("ETag: " . sha1(date("YmdHis", getlastmod()))); ?>


Re: php header

Posted: Sun Aug 23, 2015 9:29 pm
by Celauran
Doesn't matter in the slightest
W3C wrote:The order in which header fields with differing field names are received is not significant. However, it is "good practice" to send general-header fields first, followed by request-header or response- header fields, and ending with the entity-header fields.
http://www.w3.org/Protocols/rfc2616/rfc ... tml#sec4.2

Re: php header

Posted: Mon Aug 24, 2015 8:22 am
by Vegan
I have been considering more ideas for search engines and general site improvements

I have one other header so I guess they can be piled as needed

Code: Select all

<?php header('Content-Type: text/html; charset=ISO-8859-1'); ?>

Re: php header

Posted: Mon Aug 24, 2015 8:58 am
by Celauran
[text]charset=ISO-8859-1[/text]
Oh, don't do that.

Re: php header

Posted: Mon Aug 24, 2015 6:00 pm
by Vegan
unfortunately I need that due to some generated content

if I could I would use utf-8