cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Gianni (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-476) [PATCH] No-cache enhancement for ResourceReader component
Date Mon, 14 Nov 2005 14:37:28 GMT
    [ http://issues.apache.org/jira/browse/COCOON-476?page=comments#action_12357594 ] 

Simone Gianni commented on COCOON-476:
--------------------------------------

This patch is giving some problems. The Vary header (as stated on
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44 ) is not used to
tell a browser not to cache a file, this happens with Microsoft explorer just
because Microsoft decided not to fully implement this header in their cache
control, and took the short path "don't cache if this header is there" (look
http://lists.over.net/pipermail/mod_gzip/2002-December/006826.html for a nice
overview)

This was good as long as the HTTP/1.1 specs were quite new and Firefox was not
there. Firefox has a different approach, caches the file, and many proxies as
well, so using the Vary header is now Microsoft ie specific and based on a
Microsoft ie bug.

IMMO the common headers should be used (Expires, Last-modified, Pragma etc..
etc..) not to be Microsoft specific and to be HTTP/1.1 compliant. I can produce
the patch if needed.

> [PATCH] No-cache enhancement for ResourceReader component
> ---------------------------------------------------------
>
>          Key: COCOON-476
>          URL: http://issues.apache.org/jira/browse/COCOON-476
>      Project: Cocoon
>         Type: Improvement
>   Components: * Cocoon Core
>     Versions: 2.0.3
>  Environment: Operating System: Linux
> Platform: Other
>     Reporter: andi
>     Assignee: Cocoon Developers Team
>     Priority: Minor

>
> This small patch enables the possibility to prevent IE from caching resources:
> Sitemap:
> <map:read src="images/background.gif"/>
>    <map:parameter name="expires" value="0"/>
> </map:read>
> In the original code, it wasn't possible to set the expires value to 0.
> Therefore it wasn't possible to prevent IE to cache specific resources.
> Can someone apply this small patch? Thx.
> Andi
> diff 
> ResourceReader.java /home/xmlcocoon2/src/java/org/apache/cocoon/reading/Resourc
> eReader.java 
> 163,166d162
> <       if (expires == 0) {
> <             response.addHeader("Vary", "Host");
> <         }
> <

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


Mime
View raw message