The JQuery plugin provides a simple interface window.sessionStorage
while providing limited support for requests across protocols. session.js is a brilliant tiny sessionStorage manipulation plugin used to set, get, clear, and take away information saved in browser session storage.
Must Read: Form Prefill Based on URL Parameters, Cookies, or Session Store | jquery.formprefill
How to make use of it:
1. Load the primary script jquery.session.js after loading the most recent jQuery library.
<script src="/path/to/cdn/jquery.min.js"></script> <script src="/path/to/jquery.session.js"></script>
2. Save information to sessionStorage.
// $.session.set('key', 'value'); $.session.set('website', 'WCF');
3. Get saved information from sessionStorage.
// $.session.get('key'); $.session.get('website'); => 'WCF'
4. The plugin additionally helps technique chaining as follows:
$.session.set('website', 'WCF').get('website'); => 'WCF'
5. Remove saved information from sessionStorage.
// $.session.remove('key'); $.session.remove('website');
6. Clear all saved information from sessionStorage.
$.session.clear();
See Also –
Pull-based Cross-window Communication for Multi-window Angular Apps
Prevent Data Loss In The Form By Refreshing Page | oops.js
Onclick Toggle Show Hide Other Div jQuery | jq-collapse.js
See Demo And Download
Official Website(AlexChittock): Click Here
This superior jQuery/javascript plugin is developed by AlexChittock. For extra Advanced Usage, please go to the official website.