Monday, 14 December 2009

JSESSIONID and Google Chrome

Just sorted an odd problem with Google Chrome changing the JSESSIONID cookie on every request. This was only a problem with google chrome and not with other browsers.

It turned out that Chrome was requesting favicon.ico for every request. As this file is requested from the root of the website and not from the application path, so /favicon.ico and not /app/favicon.ico. However we did not have a favico.ico on the webserver and the server was setup so that a 404 error send a redirect to the main index page /app/index (not ideal - must fix that soon as well).

When Chrome requests this redirected URL, it does not send the JSESSIONID, causing the application to generate a new session and changing the cookie stored by the server. This gives the effect of the JSESSIONID changing on each request.

Adding a favicon.ico has fixed the error in this case.

Just off to change the 404 handling as I guess we may have this problem whenever a page is not found...

2 comments:

Thomas said...
This comment has been removed by the author.
Thomas said...

Wrote a bug report:

http://code.google.com/p/chromium/issues/detail?id=31222