gives the currently active web session used by WebExecute.


$CurrentWebSession
gives the currently active web session used by WebExecute.
Details

- $CurrentWebSession is set to the WebSessionObject created by StartWebSession.
- WebExecute uses $CurrentWebSession when no WebSessionObject is provided.
- When the session corresponding to $CurrentWebSession is closed with DeleteObject, $CurrentWebSession is set to None.
- $CurrentWebSession can be set to any active WebSessionObject.
Examples
Basic Examples (1)
$CurrentWebSession is None initially:
$CurrentWebSession is the most recently started WebSessionObject:
WebExecute uses $CurrentWebSession when no other WebSessionObject is given:
$CurrentWebSession is None again:
See Also
Related Guides
History
Text
Wolfram Research (2019), $CurrentWebSession, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentWebSession.html.
CMS
Wolfram Language. 2019. "$CurrentWebSession." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$CurrentWebSession.html.
APA
Wolfram Language. (2019). $CurrentWebSession. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CurrentWebSession.html
BibTeX
@misc{reference.wolfram_2025_$currentwebsession, author="Wolfram Research", title="{$CurrentWebSession}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/$CurrentWebSession.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_$currentwebsession, organization={Wolfram Research}, title={$CurrentWebSession}, year={2019}, url={https://reference.wolfram.com/language/ref/$CurrentWebSession.html}, note=[Accessed: 11-August-2025]}