[
https://issues.jboss.org/browse/RF-13294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicholas Oxhøj updated RF-13294:
--------------------------------
Description:
There seems to be a problem with the caching headers sent by RichFaces in
relation to IE (IE8 at least which is the one I have tested).
The default for RichFaces, is to tell the browser to cache static resources for
24 hours:
{code}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-control: max-age=86400
Last-Modified: Tue, 29 Oct 2013 13:01:56 GMT
Expires: Wed, 30 Oct 2013 13:02:39 GMT
Content-Type: text/javascript
Content-Length: 117992
Date: Tue, 29 Oct 2013 13:02:39 GMT
{code}
But it seems that when IE, after 24 hours, validates the file with a
"If-Modified-Since" and receives a "304 Not Modified" response
{code}
HTTP/1.1 304 Not Modified
Server: Apache-Coyote/1.1
Date: Tue, 29 Oct 2013 13:07:56 GMT
{code}
it will *keep* re-validating the file on all subsequent pages/uses, whereas
e.g. FireFox _seems_ to reapply the "max-age" of 24 hours, that it was told on
the initial GET of the file.
I haven't been able to find any specifications, blog posts or anything else
related to how the browser should react _after_ having received a "304 Not
Modified" response.
But it seems that if you add a "Cache-control: max-age=..." header to the "304
Not Modified" response in InternetResourceService#serviceResource(), IE will
not re-validate the file until that max-age has expired.
{code}
HTTP/1.1 304 Not Modified
Server: Apache-Coyote/1.1
Cache-control: max-age=86400
Date: Tue, 29 Oct 2013 13:07:56 GMT
{code}
was:
There seems to be a problem with the caching headers sent by RichFaces in
relation to IE (IE8 at least which is the one I have tested).
The default for RichFaces, is to tell the browser to cache static resources for
24 hours. But it seems that when IE, after 24 hours, validates the file with a
"If-Modified-Since" and receives a "304 Not Modified" response, it will KEEP
re-validating the file on all subsequent pages/uses, whereas e.g. FireFox
_seems_ to reapply the "max-age" of 24 hours, that it was told on the initial
GET of the file.
I haven't been able to find any specifications, blog posts or anything else
related to how the browser should react _after_ having received a "304 Not
Modified" response.
But it seems that if you add a "Cache-control: max-age=..." header to the "304
Not Modified" response in InternetResourceService#serviceResource(), IE will
not re-validate the file until that max-age has expired.
> Broken caching of static resources in IE
> ----------------------------------------
>
> Key: RF-13294
> URL: https://issues.jboss.org/browse/RF-13294
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.3.3.Final
> Reporter: Nicholas Oxhøj
>
> There seems to be a problem with the caching headers sent by RichFaces in
> relation to IE (IE8 at least which is the one I have tested).
> The default for RichFaces, is to tell the browser to cache static resources
> for 24 hours:
> {code}
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Last-Modified: Tue, 29 Oct 2013 13:01:56 GMT
> Expires: Wed, 30 Oct 2013 13:02:39 GMT
> Content-Type: text/javascript
> Content-Length: 117992
> Date: Tue, 29 Oct 2013 13:02:39 GMT
> {code}
> But it seems that when IE, after 24 hours, validates the file with a
> "If-Modified-Since" and receives a "304 Not Modified" response
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
> it will *keep* re-validating the file on all subsequent pages/uses, whereas
> e.g. FireFox _seems_ to reapply the "max-age" of 24 hours, that it was told
> on the initial GET of the file.
> I haven't been able to find any specifications, blog posts or anything else
> related to how the browser should react _after_ having received a "304 Not
> Modified" response.
> But it seems that if you add a "Cache-control: max-age=..." header to the
> "304 Not Modified" response in InternetResourceService#serviceResource(), IE
> will not re-validate the file until that max-age has expired.
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues