[enh] Make session persists accross multiple tabs. #144

This commit is contained in:
opi 2016-02-04 12:06:34 +01:00
parent 312eba3b7c
commit 2b97eb5018
2 changed files with 10 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -67,8 +67,14 @@
// Look for supported type of storage to use
/**
* http://sammyjs.org/docs/api/0.7.4/all#Sammy.Store.LocalStorage
* LocalStorage is our favorite, as it allows multiple tabs
*/
var storageType;
if (Sammy.Store.isAvailable('session')) {
if (Sammy.Store.isAvailable('local')) {
storageType = 'local';
} else if (Sammy.Store.isAvailable('session')) {
storageType = 'session';
} else if (Sammy.Store.isAvailable('cookie')) {
storageType = 'cookie';