Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set session variables from javascript?

Tags:

javascript

Is it possible to set session variables from javascript?

like image 944
Yves Avatar asked Dec 07 '22 06:12

Yves


1 Answers

The short answer is no.

You can set cookies, but they're not quite the same.

You could also use AJAX to post back to a script on your server that will set the variables. Session variables exist only on the server.

like image 180
Greg Avatar answered Dec 29 '22 14:12

Greg