July 6, 2011

SessionID parameter at end of URL

Sometimes links on my xpages gets the SessionID parameter appended at the end:

I read on this page some comments regarding the SessionID parameter.

Q. Sometimes when XPage is submitted it adds SessionID to the URL and some JavaScript stops working. What's that SessionID?

This is due to the way HTTP is working. HTTP is stateless so the browser must pass an ID to the server in order to keep a session open on the server. There are two ways for passing this ID.

1- Passing the ID as part of the URL
2 - Passing the ID as part of the cookie from the browser

The second way is the preferred way. But for the first page the XPages engine doesn't know if the browser that is connecting to the page is supporting cookies or not, so it tries first by passing an ID and a cookie. And on the second request it looks for the cookie, and if the cookie is there it removes the ID from the URL. So if you look at all the application servers they are all working like that. Now there is a property in XPages that says 'assume that the client has cookie', and in these cases do not use a session ID at all. So that would break some browsers that do not support having cookies enabled.

What im looking for is the 'assume that the client has cookie' property. Where is it located, or are there any other ways to turn off this SessionID ?


  1. I use a computed text field that returns an 'a' tag. The editor doesn't let me paste the code here.

    For links to XPages this is not a problem. And as the doc says this happens only the first time you open a page. Trying to figure out whether we have a better solution in 853.

  2. Hi Niklas,

    the problem is when the link is to for instance a word document. Havent seen any problems with regular anchor tags yet. Thank you for responding!

  3. In 8.5.3 this is magically solved. Doesn't occur anymore and you don't have to configure anything.

  4. Thank you Niklas, Sounds lovely!

  5. Still... My client's website is on an R8.5.3 server and Google has several links with SessionID. I get the idea that that parameter ruins the indexability and ranking.

    Search Google for
    site:www.the-academy.nl ta.nsf sessionid