I am trying to add a last-modified date to the html source code of the pages served by our CMS (Jahia) so that it appears as an attribute in the response header.
This is needed for our search engine indexation.
I have tried adding in the head tag the following syntaxes but none allow a modified date to appear in the response headers:
<meta name="dcterms.modified" content="Mon, 09 Apr 2018 11:41:11 GMT">
<meta name="DCTERMS.modified" content="Mon, 09 Apr 2018 11:41:11 GMT">
<meta http-equiv="last-modified" content="Mon, 09 Apr 2018 11:41:11 GMT">
<meta http-equiv="Last-Modified" content="Mon, 09 Apr 2018 11:41:11 GMT">
(these dates are resolved from the fmt:formatDate pattern = "EEE, dd MMM yyyy HH:mm:ss z").
Am I incorrectly assuming that a meta tag added inside the head tag can be added to the header? I read on the W3Schools site that the only attributes for http-equiv are
<meta http-equiv="content-type|default-style|refresh">
so that is probably why that syntax doesn't work (although I can find references to it on the web).
Thanks in advance for your help.
You can include any metadata into the head html produced by Jahia for your pages. Here is an example of an html output from one of our page:
In order to retrieve them, you need to use the current page node:
According to the Jahia API, you can retrieve the following page properties:
And then output them into your component view or template: