Is it by any means possible to read the browser session id using javascript?
For PHP's PHPSESSID variable, this function works:
function getPHPSessId() {
var phpSessionId = document.cookie.match(/PHPSESSID=[A-Za-z0-9]+\;/i);
if(phpSessionId == null)
return '';
if(typeof(phpSessionId) == 'undefined')
return '';
if(phpSessionId.length <= 0)
return '';
phpSessionId = phpSessionId[0];
var end = phpSessionId.lastIndexOf(';');
if(end == -1) end = phpSessionId.length;
return phpSessionId.substring(10, end);
}