Skip to main content

Resource reloading even in production stage.

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-05-12

is there a known bug in mojarra that reloads javascript resources even in production project_stage when using @ResourceDependencies + ui:include? or is that the expected behaviour?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-03-28

So the browser cache isn't being used? You can set this in web.xml:

com.sun.faces.defaultResourceMaxAge 31536000000

It's worth clearing the browser cache and checking the cache-control setting in the
response header using something like firebug/chrome dev tools.

I found that I had a write a filter to set cache-control settings because you
generally don't want to cache your .xhtml file as they contain dynamic content
but do want to cache static resources. It can get quite fiddly to get this

I think BalusC has an example of such a thing but I couldn't actually find it
when I had a quick look.