---
title: "Is it possible to set session variables from javascript?"  
description: "Is it possible to set session variables from javascript?"  
author: "Somesh"  
published: 2010-11-16  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/236/is-it-possible-to-set-session-variables-from-javascript  
category: "ajax"  
tags: ["ajax"]  
reading_time: 1 minute  

---

# Is it possible to set session variables from javascript?

It's not possible to set any session variables directly from javascript as it is purely a client side technology. You can use AJAX though to asyncronously...\
\
Cannot parse XML generated by JSP I am generating an XML using JSP, when i run the JSP in IE it shows the XML as per DOM, but when i try to parse it using Javascript , the command xmldoc.documentElement...\
\
This is working code I am using, it might help you. if (!isIE) xmldoc = req.responseXML; else { //IE does not take the responseXML as...\

## Answers

### Answer by Somesh

It's not possible to set any session variables directly from javascript as it is purely a client side technology. You can use AJAX though to asyncronously...\
\
Cannot parse XML generated by JSP I am generating an XML using JSP, when i run the JSP in IE it shows the XML as per DOM, but when i try to parse it using Javascript , the command xmldoc.documentElement...\
\
This is working code I am using, it might help you. if (!isIE) xmldoc = req.responseXML; else { //IE does not take the responseXML as...\


---

Original Source: https://www.mindstick.com/interview/236/is-it-possible-to-set-session-variables-from-javascript

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
