Daniel U.
2007-May-03 20:48 UTC
Scriptaculous problem loading required libraries in first page loaded because of jsessionid in URL
In the first HTTP exchange, some web/application servers send the session ID as part of the URLs included in the page in order to determine whether the browser supports cookies or not. In the case of Tomcat, it includes the session ID in the following format http://myserver/myUrl;jsessionid=sessID The first page requested, which includes a script tag for scriptaculous looks like this: <script src="/scriptaculous.js;jsessionid=aSessionID" type="text/ javascript"></script> Because of this, the call to Scriptaculous.load() is not working and nothing gets loaded. It''s basically not finding the script tag at all. I tried to open a ticket on Rails Trac for this, but I didn''t have permission to do it. I know that I can modify the code to strip out this if it is present, but was wondering whether it makes sense to also include this in the code base. Any help would be appreciated. Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thomas Fuchs
2007-May-03 22:57 UTC
Re: Scriptaculous problem loading required libraries in first page loaded because of jsessionid in URL
I suggest that you load in the files you need individually, scriptaculous.js is just a convenience script file that basically inserts <script> tags that load in the various .js files. just include effects.js, dragdrop.js, controls.js and what ever else you need as you would include scriptaculous.js (note that effects.js is a prerequisite for the other .js files). You also might want to not use session ids for the .js files, as they''re static assets, like images (this will help performance, as you can have more efficent caching). Best, Thomas Am 03.05.2007 um 22:48 schrieb Daniel U.:> > In the first HTTP exchange, some web/application servers send the > session ID as part of the URLs included in the page in order to > determine whether the browser supports cookies or not. > > In the case of Tomcat, it includes the session ID in the following > format http://myserver/myUrl;jsessionid=sessID > > The first page requested, which includes a script tag for > scriptaculous looks like this: > > <script src="/scriptaculous.js;jsessionid=aSessionID" type="text/ > javascript"></script> > > Because of this, the call to Scriptaculous.load() is not working and > nothing gets loaded. It''s basically not finding the script tag at all. > > I tried to open a ticket on Rails Trac for this, but I didn''t have > permission to do it. > > I know that I can modify the code to strip out this if it is present, > but was wondering whether it makes sense to also include this in the > code base. > > Any help would be appreciated. > > Daniel > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---