Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nilesh Gundecha
Redeploying theme force the clear the browser cache
December 1, 2011 8:32 PM
Answer

Nilesh Gundecha

Rank: Regular Member

Posts: 189

Join Date: November 30, 2009

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
Tomas Polesovsky
RE: Redeploying theme force the clear the browser cache
December 2, 2011 2:10 PM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 566

Join Date: February 13, 2009

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
Nilesh Gundecha
RE: Redeploying theme force the clear the browser cache
December 2, 2011 10:33 PM
Answer

Nilesh Gundecha

Rank: Regular Member

Posts: 189

Join Date: November 30, 2009

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
Tomas Polesovsky
RE: Redeploying theme force the clear the browser cache
December 3, 2011 7:44 AM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 566

Join Date: February 13, 2009

Recent Posts

Nilesh,

have you turned on portal-developer.properties? Try to add into your portal-ext.properties:
 1
 2theme.css.fast.load=false
 3theme.images.fast.load=false
 4
 5javascript.fast.load=true
 6javascript.log.enabled=false
 7
 8layout.template.cache.enabled=false
 9
10browser.launcher.url=
11
12combo.check.timestamp=true
13
14freemarker.engine.cache.storage=soft:1
15freemarker.engine.modification.check.interval=0
16
17openoffice.cache.enabled=false
18
19velocity.engine.resource.manager.cache.enabled=false
20
21com.liferay.portal.servlet.filters.cache.CacheFilter=false
22
23com.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:
1/my-theme/css/my-style.css?browserId=other&languageId=en_US&t=1322753814000


Regards
-- tom
Puneet Upadhyay
RE: Redeploying theme force the clear the browser cache
April 20, 2012 4:11 AM
Answer

Puneet Upadhyay

Rank: Regular Member

Posts: 234

Join Date: October 22, 2011

Recent Posts

Thanks Tomas.