Hi,
I would like to ask, when developing a mobile WebView app with HTML5, JQuery and backend PHP with MySQL server.
Is it better to use the $_SESSION to save the session variables or I should use sessionStorage?
Thanks,
Jassim
Hi,
I would like to ask, when developing a mobile WebView app with HTML5, JQuery and backend PHP with MySQL server.
Is it better to use the $_SESSION to save the session variables or I should use sessionStorage?
Thanks,
Jassim
That would highly depend on how you intend to use the data since the two are not equivalent methods of storing.
For example, do you care if the user is able to alter the data (maliciously or otherwise)? Do you care that you can't use the information in any server-side scripts since it won't be available (unless you add extra client-side code to do something like an AJAX request)?
If you said "no" to both, then sessionStorage might be a viable alternative. Otherwise, you'll want to stick with server-side sessions.