Issue
-
Not all of the static requests are cached in Google Chrome, when you follow this documentation to set up HTTPs:
Setting Up HTTPs on Tomcat
Reproduction steps:
- Set up the portal as per attached documentation
- Access the home page over 8443 port and observe the network tab in chrome browser
- Press F5 a few times
- Some of the static requests are cached, some are not, maybe only subsequently after pressing F5 several times
- Press Ctrl + F5
- Starts all over again, several refresh is needed, until all of them are cached
Environment
- DXP 7.2
- DXP 7.1
- DXP 7.0
Resolution
Other than setting Cache-control headers, Liferay should not have any control over browser caches.
As we do not add no-cache header to the HTTPs responses, in other words we do not disable caching, we let the browser itself decide whether it caches the response or not.
Further tests and analysis showed that there is no difference between the two behaviours (HTTPs and HTTP) in Mozilla Firefox for example, thus this cannot be considered a Liferay bug.