You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jchappelle <jc...@4redi.com> on 2008/08/09 03:41:16 UTC

Images not caching in browser

Every time my pages load all the images load again. I'm not sure how to fix
this. Is it a change in my filter mapping?

Most of my images are loaded as a background-image style rule. My web.xml
filter mapping is this:

	 <filter-mapping>
		<filter-name>myApplication</filter-name>
		<url-pattern>/*</url-pattern>
	 </filter-mapping>

In my web root I have the following files and folders:
styles.css, images, WEB-INF. 

Can someone please help? This is really making my site run slowly. 

Thanks for your time. 
-- 
View this message in context: http://www.nabble.com/Images-not-caching-in-browser-tp18901385p18901385.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Images not caching in browser

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Fri, 08 Aug 2008, jchappelle wrote:
> Every time my pages load all the images load again. I'm not sure how to fix
> this. Is it a change in my filter mapping?

Does this happen on all browsers?

I think that IE 6 needs some more caching headers than the 
others

  http://aspnetresources.com/blog/cache_control_extensions.aspx                   
Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Images not caching in browser

Posted by jchappelle <jc...@4redi.com>.
That was it. There was a no-cache header being sent to the browser from
tomcat. I'll post my findings for anyone else that is having the same
problem.

I used a tool called fiddler to examine the headers that were being sent
down. You can get it here: http://www.fiddler2.com/fiddler2/

After that we found this post that was very helpful:

http://www.symphonious.net/2007/06/19/caching-in-tomcat/

Basically our server had basic authentication set up in tomcat. So the
change we made in server.xml was this:

<Context><Valve
className="org.apache.catalina.authenticator.BasicAuthenticator" 
disableProxyCaching="false" /></Context>

Also for the Context element we had to set the path="/mypath". 

I hope this helps someone in the future. Thanks for your help.

Josh
-- 
View this message in context: http://www.nabble.com/Images-not-caching-in-browser-tp18901385p18931041.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Images not caching in browser

Posted by Igor Vaynberg <ig...@gmail.com>.
it might be, i am not sure. try tomcat 5 without apache infront of it.

-igor

On Sat, Aug 9, 2008 at 1:19 PM, jchappelle <jc...@4redi.com> wrote:
>
> I am using Tomcat 5 running as a mod under the apache http server.
>
> Do you think it is a configuration in tomcat?
> --
> View this message in context: http://www.nabble.com/Images-not-caching-in-browser-tp18901385p18908064.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Images not caching in browser

Posted by jchappelle <jc...@4redi.com>.
I am using Tomcat 5 running as a mod under the apache http server. 

Do you think it is a configuration in tomcat?
-- 
View this message in context: http://www.nabble.com/Images-not-caching-in-browser-tp18901385p18908064.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Images not caching in browser

Posted by Igor Vaynberg <ig...@gmail.com>.
if the image is in your context dir then it will be streamed by the
servlet container. wicket filter will let the url handling fall
through to the container...

so it is the servlet container that is not setting caching headers?
what container are you using?

-igor

On Fri, Aug 8, 2008 at 6:41 PM, jchappelle <jc...@4redi.com> wrote:
>
> Every time my pages load all the images load again. I'm not sure how to fix
> this. Is it a change in my filter mapping?
>
> Most of my images are loaded as a background-image style rule. My web.xml
> filter mapping is this:
>
>         <filter-mapping>
>                <filter-name>myApplication</filter-name>
>                <url-pattern>/*</url-pattern>
>         </filter-mapping>
>
> In my web root I have the following files and folders:
> styles.css, images, WEB-INF.
>
> Can someone please help? This is really making my site run slowly.
>
> Thanks for your time.
> --
> View this message in context: http://www.nabble.com/Images-not-caching-in-browser-tp18901385p18901385.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org