Redeploying theme force the clear the browser cache

thumbnail
Nilesh Gundecha, modified 14 Years ago. Regular Member Posts: 205 Join Date: 12/1/09 Recent Posts
Hi All,

Every time I do the changes to the UI theme and redeploy it in server, I am required to clear the browser cache to view the clean UI. If I dont clear the cache, then the UI looks disturbed. How can I stop this?

Regards,
Nilesh
thumbnail
Tomáš Polešovský, modified 14 Years ago. Liferay Master Posts: 677 Join Date: 2/13/09 Recent Posts
Hi

I don't know if you use IE, but IE has these problems since I started developing (ver. 5.5?).

I use Chrome (with Anonymous mode or CTRL+F5) which works well. After I'm finished, I test it in FF, Opera, Safari & IE Tester.

Anyway, you can try to play with com.liferay.portal.servlet.filters.header.HeaderFilter in the portal web.xml to set Cache-control and Expire headers for all content to the past, so your browser will need to download the resources any time you visit a page.

Hope it helps a bit emoticon

-- tom
thumbnail
Nilesh Gundecha, modified 14 Years ago. Regular Member Posts: 205 Join Date: 12/1/09 Recent Posts
Thanks for the reply Tomas.

I need to clear the client browser cache irrespective of the which browser I am using. And it seems like this is happening only with the Custom UI Theme created.

I have also set the "theme.css.fast.load=false".

Am I missing something in my custom theme. Any pointers please?

Regards,
Nilesh

Tomáš Polešovský:
Hi

I don't know if you use IE, but IE has these problems since I started developing (ver. 5.5?).

I use Chrome (with Anonymous mode or CTRL+F5) which works well. After I'm finished, I test it in FF, Opera, Safari & IE Tester.

Anyway, you can try to play with com.liferay.portal.servlet.filters.header.HeaderFilter in the portal web.xml to set Cache-control and Expire headers for all content to the past, so your browser will need to download the resources any time you visit a page.

Hope it helps a bit emoticon

-- tom
thumbnail
Tomáš Polešovský, modified 14 Years ago. Liferay Master Posts: 677 Join Date: 2/13/09 Recent Posts
Nilesh,

have you turned on portal-developer.properties? Try to add into your portal-ext.properties:

theme.css.fast.load=false
theme.images.fast.load=false

javascript.fast.load=true
javascript.log.enabled=false

layout.template.cache.enabled=false

browser.launcher.url=

combo.check.timestamp=true

freemarker.engine.cache.storage=soft:1
freemarker.engine.modification.check.interval=0

openoffice.cache.enabled=false

velocity.engine.resource.manager.cache.enabled=false

com.liferay.portal.servlet.filters.cache.CacheFilter=false

com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true


And check please also generated HTML in the browser, that your css' and js' contains the timestamp and the other code:
/my-theme/css/my-style.css?browserId=other&languageId=en_US&t=1322753814000


Regards
-- tom
thumbnail
Puneet Upadhyay, modified 13 Years ago. Regular Member Posts: 234 Join Date: 10/22/11 Recent Posts
Thanks Tomas.