I used Chrome's auditing feature to try to find some performance bottlenecks in my web site. I found a lot of reports of non-cacheable resources.
I did a dry run with a single-page containing a stylesheet in a library and found the same thing:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html" >
<h:head>
<h:outputStylesheet library="default" name="style.css"/>
</h:head>
<h:body>
<div><h:outputText value="test"/></div>
</h:body>
</html>
Here's the audit log entry:
The following resources are explicitly non-cacheable. Consider making them cacheable if possible:
style.css.jsf
The interesting thing is, if I remove it from the library, this message goes away. So, it looks like there is a problem with caching resources in libraries.
Is there a way to fix this?
EDIT: According to one of the comments in this answer, perhaps CSS is not cached if a normal refresh is performed on the page: Set HTTP headers properly to force caching on JS, CSS and PNG files
Can that be right? Why can't a bookmark or typed in URL re-used the cached copy?