You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andreas Neuenschwander <an...@andi.ch> on 2002/09/03 15:22:44 UTC
Caching Problem of static Content (specially images)
Hi Cocooners,
It seems that there is still a problem with the caching in cocoon.
First, images cannot be cached by browsers.
Second, all static content in the cache is a repsonse which is already
commited.
This will lead to problems if you are adding a filter to the cocoon servlet
which
tries to change the ServletResponseOutputStream.
(It's not possible, because the OutputStream is already commited)
The headers of cocoon output is different
---coocoon-----------
HTTP/1.1 200 OK
Date: Tue, 03 Sep 2002 13:05:21 GMT
Server: Jetty/4.1.B1 (Linux 2.4.7-10smp i386)
Servlet-Engine: Jetty/4.1.B1 (Servlet 2.3; JSP 1.2; java 1.4.0_01)
X-Cocoon-Version: 2.0.4-dev
Vary: Host
Vary: Host
Vary: Host
Vary: Host
Vary: Host
Content-Type: image/gif
Last-Modified: Mon, 02 Sep 2002 05:51:00 GMT
Content-Length: 18570
Accept-Ranges: none
GIF89aT
---apache-----------
HTTP/1.1 200 OK
Date: Tue, 03 Sep 2002 13:18:09 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6
Last-Modified: Mon, 02 Sep 2002 05:21:44 GMT
ETag: "528139-4260-3d72f568"
Accept-Ranges: bytes
Content-Length: 16992
Connection: close
Content-Type: image/gif
GIF89aso?
I'm not sure what exactly prevents the browsers from caching the cocoon
content.
Can anyone help?
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Caching Problem of static Content (specially images)
Posted by tc...@dff.st.
> >Hi Cocooners,
> >
> >It seems that there is still a problem with the caching in cocoon.
> >
> >First, images cannot be cached by browsers.
> >
>
> This is not true. Perfectly cached over here.
Looks like keep-alives are not enabled when going through the apache webserver
(Did you check your httpd.conf?)
> >Connection: close
We are experienced the same behaviour with Apache+JRun+cocoon1 but not when we
are using JRun's internal webserver - although we turned keep-alives on.
Apache+resin+cocoon2 just works fine. I am wondering if this has something to
do how the connector/module is written. This becoming a little OT but if
someone had an idea I also would be glad to hear it ;)
--
Torsten
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Caching Problem of static Content (specially images)
Posted by Vadim Gritsenko <va...@verizon.net>.
Andreas Neuenschwander wrote:
>Hi Cocooners,
>
>It seems that there is still a problem with the caching in cocoon.
>
>First, images cannot be cached by browsers.
>
This is not true. Perfectly cached over here.
>Second, all static content in the cache is a repsonse which is already
>commited.
>
What does this mean?
>This will lead to problems if you are adding a filter to the cocoon servlet
>which
>tries to change the ServletResponseOutputStream.
>
What are you trying to change there?
Vadim
>(It's not possible, because the OutputStream is already commited)
>
>
>The headers of cocoon output is different
>
>---coocoon-----------
>
>HTTP/1.1 200 OK
>
>Date: Tue, 03 Sep 2002 13:05:21 GMT
>
>Server: Jetty/4.1.B1 (Linux 2.4.7-10smp i386)
>
>Servlet-Engine: Jetty/4.1.B1 (Servlet 2.3; JSP 1.2; java 1.4.0_01)
>
>X-Cocoon-Version: 2.0.4-dev
>
>Vary: Host
>
>Vary: Host
>
>Vary: Host
>
>Vary: Host
>
>Vary: Host
>
>Content-Type: image/gif
>
>Last-Modified: Mon, 02 Sep 2002 05:51:00 GMT
>
>Content-Length: 18570
>
>Accept-Ranges: none
>
>GIF89aT
>
>
>
>---apache-----------
>
>
>
>HTTP/1.1 200 OK
>
>Date: Tue, 03 Sep 2002 13:18:09 GMT
>
>Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6
>
>Last-Modified: Mon, 02 Sep 2002 05:21:44 GMT
>
>ETag: "528139-4260-3d72f568"
>
>Accept-Ranges: bytes
>
>Content-Length: 16992
>
>Connection: close
>
>Content-Type: image/gif
>
>GIF89aso?
>
>
>
>I'm not sure what exactly prevents the browsers from caching the cocoon
>content.
>
>Can anyone help?
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org