Search code examples
cachingliferayliferay-6

liferay pages cached when working offline


In liferay application, we have page loaded from actionurl. Once after page is loaded, in browser we are setting work offline.

If we copy the "actionurl" of the loaded page and tried accessing on another tab, still page is getting loaded. This page is getting loaded from cache. From developer tool, we could see page loaded with label "cached".

How to prevent this?.

setting browser.cache.disabled=true - is not working in the above case.


Solution

  • Try this, in portlet.xml under portlet-class and init-param add:

    <expiration-cache>0</expiration-cache>
    

    This would set a cache that is always expired.