theme-plugin sass resources are sometimes cached even when portal-developer.properties is enabled

Description

During recent theme development testing, we have seen that some browsers (Google Chrome) will aggressively cache .sass resources even if the current portal-developer.properties is enabled. It was found out that there are some additional servlet filters that would need to be disabled to 100% prevent these aggressive browsers from caching the theme resources.

So this ticket is to consider adding additional filters to be disabled via the portal-developer.properties file, namely:
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.etag.ETagFilter=false
com.liferay.portal.servlet.filters.header.HeaderFilter=false

Activity

Show:

EdG April 16, 2013 at 12:13 PM

Hello everyone! We are in the process of moving component "Theme" to "Theme > Dev" in LPS. Please make the necessary adjustments to your filters. Thanks!

Michael Saechang July 26, 2012 at 9:00 AM

Committed on:
Portal 6.1.x CE GIT ID: cdf1f6157063a8f8c13126c3d73dc09924a22924.
Portal 6.2.x GIT ID: d4f9e4ff5d3c7a21a591e5dff9c2ab6af0bcdc4b.

Ashirov Felix May 31, 2012 at 2:54 AM

We've tried to disables these filters too.
No effect

Gregory Amerson May 31, 2012 at 2:32 AM

Small correction,
com.liferay.portal.servlet.filters.cache.CacheFilter=false

This property is already set correctly in developer mode, the two that are not set that need to be to competely eleminate cache issues for aggressive browsers are these two:
com.liferay.portal.servlet.filters.etag.ETagFilter=false
com.liferay.portal.servlet.filters.header.HeaderFilter=false

Ashirov Felix May 31, 2012 at 1:51 AM

We've faced same problem when developing themes.
After some research we've found that the problem is that the CacheFilter ignores "com.liferay.portal.servlet.filters.cache.CacheFilter=false" and caches content.

Our workaround steps for Liferay Portal 6.1 bundled with tomcat:
1. Deploy theme application
2. After deployment finished remove Cache Filter mapping from theme application web.xml.
3. Tomcat Auto Deployer tracks web.xml changes and reloads application

After these steps theme resources modifications are applied correctly.

Completed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Branch Version/s

6.1.x
6.0.x

Backported to Branch

Committed

Priority

Zendesk Support

Created May 30, 2012 at 1:01 AM
Updated June 26, 2023 at 6:21 AM
Resolved July 26, 2012 at 9:02 AM

Flag notifications