[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=22083#action_22083
 ] 

Matteo Pelucco commented on MAGNOLIA-2478:
------------------------------------------

Done some tests, it seems to go better on 3.6.5.
The system behaves as expected with cache refresh: the If-modified-since header 
is not present anymore (still rpesent on 3.6.3), IE6 refresh everytime the 
content. As I said, everytime, even when expiration policy is set to be 30 
minutes.

Strange..

But tomorrow I will investigate better and let you know.

> SetExpirationHeaders fails to disable browser caching for Firefox 3
> -------------------------------------------------------------------
>
>                 Key: MAGNOLIA-2478
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2478
>             Project: Magnolia
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 3.6.4
>            Reporter: Philippe Marschall
>            Assignee: Grégory Joseph
>            Priority: Minor
>             Fix For: 4.0, 3.6.4, 3.6.5
>
>         Attachments: CacheHeadersFilter.patch, CACHING under Magnolia 
> 3.6.3.pdf, SetExpirationHeaders.patch
>
>
> If we use the BrowserCachePolicy Never Firefox 3 still caches the page for a 
> short amount of time. If we add "no-store" value for the Cache-Control header 
> Firefox does no longer cache the page.
> Our code looks like this:
> {code}
>   public void processCacheRequest(HttpServletRequest request,
>       HttpServletResponse response,
>       FilterChain chain,
>       Cache cache,
>       CachePolicyResult cachePolicyResult) throws IOException, 
> ServletException {
>     BrowserCachePolicy browserCachePolicy = 
> this.getCacheConfiguration().getBrowserCachePolicy();
>     BrowserCachePolicyResult clientCacheResult = 
> browserCachePolicy.canCacheOnClient(cachePolicyResult);
>     if (clientCacheResult.getExpirationDate() < 0) {
>       response.setHeader("Pragma", "no-cache");
>       response.setHeader("Cache-Control", "no-cache, no-store");
>       response.setDateHeader("Expires", 0L);
>     } else {
>       final long maxAgeSeconds = (clientCacheResult.getExpirationDate() - 
> System.currentTimeMillis()) / 1000;
>       response.setHeader("Pragma", "");
>       response.setHeader("Cache-Control", "max-age=" + maxAgeSeconds + ", 
> public");
>       response.setDateHeader("Expires", 
> clientCacheResult.getExpirationDate());
>     }
>   }
> {code}
> We haven't yet tested with other browsers.
> There are some other issues we have with SetExpirationHeaders:
> * it tests for BrowserCachePolicyResult identity instead of using the return 
> value of #getExpirationDate
> * it sets the Expires header twice, to two different values
> I'll attach a patch later this day.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to