You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave <ja...@yahoo.com> on 2008/10/13 09:32:09 UTC

AddResource: how to prevent adding session id to stylesheet URL

Hi,
We are using AddResource to add stylesheet dynamically, like:
 
addResource.addStyleSheet(context, AddResource.HEADER_BEGIN, "/main.css");
 
In the generated HTML, the current session id is in the URL, like:
 
<link rel="stylesheet" href="/main.css;jsessionid=965804C1F45636F4BBD825591EE74E3C" type="text/css" />
 
This breaks web browser caching. Style sheet is static. We want browser to cache it for one month. But adding session id breaks browser caching because session id is dynamic and the stylesheet url will change from one session to another.
 
Is there a way to prevent session id being added to the URL?  we use cookie-based session tracking , if cookie is disabled, URL rewriting session  tracking will be used.
 
Thanks for help.
Dave



      

Re: AddResource: how to prevent adding session id to stylesheet URL

Posted by Hassan Schroeder <ha...@gmail.com>.
On Mon, Oct 13, 2008 at 12:32 AM, Dave <ja...@yahoo.com> wrote:

> We are using AddResource to add stylesheet dynamically, like:
>
> addResource.addStyleSheet(context, AddResource.HEADER_BEGIN, "/main.css");

So, wouldn't this be a question for (guessing) a MyFaces list?  :-)

Doesn't seem remotely Tomcat-related.

H*
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org