Why the server does not give the date of the last change of the document?

For static documents, the server actually outputs the date of the last change. However, if the formation of your pages has a dynamic nature (for example, using PHP), then you should form this parameter yourself.

You can do this in the following ways:

In PHP – add this line to the script
header(“Last-Modified: “.gmdate(“D, d M Y H:i:s”).” GMT +0200″);
This code gives the date of the last change as the current date, which is generally true – searchers will feel that the document has literally just been changed.

Or, using the capabilities of .htaccess, write the following lines:
ExpiresActive on
ExpiresByType text/html “access plus 3 days”
or
Header set Last-Modified “15 Jun 2004 12:00:00 GMT”

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support