Loading...
 
Skip to main content

HTTP headers incorrect

Status
Open
Subject
HTTP headers incorrect
Version
18.x Regression
Category
  • Consistency
Feature
Performance / Speed / Load / Compression / Cache
Web Service
Resolution status
New
Submitted by
Wiebe
Lastmod by
Wiebe
Rating
(0)
Description

If you inspect the HTTP headers of a page generated by Tiki, it has an Expires header in the past:
Expires: Thu, 19 Nov 1981 08:52:00 GMT

Beside that, I also suggest to enable caching, at least in the Raw page display (tiki-index_raw.php?page=), it enables the browser to cache frequently used information by something like the AJAXLoad plugin and improves performance.
Now the Pragma header has:
Pragma: no-cache
And the cache-control header:
Cache-Control: no-store, no-cache, must-revalidate

Workaround

When using IIS as server; add in you web.config between </rules> and </rewrite> the next code:

Copy to clipboard
<outboundRules> <rule name="Remove Pragma" preCondition="tiki-index_raw.php"> <match serverVariable="RESPONSE_Pragma" pattern="(.*)" /> <action type="Rewrite" /> </rule> <rule name="Add Caching" preCondition="tiki-index_raw.php"> <match serverVariable="RESPONSE_Cache-Control" pattern="(.*)" /> <action type="Rewrite" value="private, max-age=300" /> </rule> <rule name="Remove Expires" preCondition="tiki-index_raw.php"> <match serverVariable="RESPONSE_Expires" pattern="(.*)" /> <action type="Rewrite" /> </rule> <preConditions> <preCondition name="tiki-index_raw.php"> <add input="{URL}" pattern="tiki-index_raw.php*" /> </preCondition> </preConditions> </outboundRules>
Importance
5
Easy to solve?
9
Priority
45
Demonstrate Bug on Tiki 19+
Please demonstrate your bug on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
7024
Created
Thursday 14 February, 2019 08:56:14 UTC
by Wiebe
LastModif
Tuesday 24 September, 2019 13:43:17 UTC


Show PHP error messages