> From: David Smith [mailto:[EMAIL PROTECTED]
> Subject: Tomcat caching of static resources?
>
> is it possible to cache static images and .js files in Tomcat?

Think about what you just asked for: how would caching static resources in the 
server avoid them being downloaded by the browser?  It's the browser that must 
cache the information to avoid the redundant downloads.

> When i look at the browser cache it looks like the browser
> is downloading all page assets for every call, including some
> very large .js files.

As stated in one of the (correct) responses to the article you referenced:

"So the first thing is to get control of the cache headers. Without them, the 
cache can not know what to do."

What are you doing to control the headers?  What headers are being used for the 
large .js files?

> but the solution didn't resolve the problem (especially if
> deploying via war files)

The original author of the article is clearly unfamiliar with Tomcat, caching, 
and security (e.g., not knowing where a context.xml file goes, and erroneously 
stating it doesn't work with a .war file).

> i cant believe there isn't a standard Tomcat configuration for this?

For what?  Caching static resources on the server end doesn't alter the amount 
of network traffic generated.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to