Skip to content

Commit 452d495

Browse files
committed
Merge pull request #359 from labaneilers/master
window.sessionStorage throws an exception when cookies are disabled in some browsers
2 parents f7a7a04 + a6e2554 commit 452d495

30 files changed

+45
-30
lines changed

scripts/bundled-uncompressed/html4+html5/dojo.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ if (typeof JSON !== 'object') {
13071307
console = window.console||undefined, // Prevent a JSLint complain
13081308
document = window.document, // Make sure we are using the correct document
13091309
navigator = window.navigator, // Make sure we are using the correct navigator
1310-
sessionStorage = window.sessionStorage||false, // sessionStorage
1310+
sessionStorage = false, // sessionStorage
13111311
setTimeout = window.setTimeout,
13121312
clearTimeout = window.clearTimeout,
13131313
setInterval = window.setInterval,
@@ -1318,6 +1318,7 @@ if (typeof JSON !== 'object') {
13181318
history = window.history; // Old History Object
13191319

13201320
try {
1321+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
13211322
sessionStorage.setItem('TEST', '1');
13221323
sessionStorage.removeItem('TEST');
13231324
} catch(e) {

scripts/bundled-uncompressed/html4+html5/extjs.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ if (typeof JSON !== 'object') {
12771277
console = window.console||undefined, // Prevent a JSLint complain
12781278
document = window.document, // Make sure we are using the correct document
12791279
navigator = window.navigator, // Make sure we are using the correct navigator
1280-
sessionStorage = window.sessionStorage||false, // sessionStorage
1280+
sessionStorage = false, // sessionStorage
12811281
setTimeout = window.setTimeout,
12821282
clearTimeout = window.clearTimeout,
12831283
setInterval = window.setInterval,
@@ -1288,6 +1288,7 @@ if (typeof JSON !== 'object') {
12881288
history = window.history; // Old History Object
12891289

12901290
try {
1291+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
12911292
sessionStorage.setItem('TEST', '1');
12921293
sessionStorage.removeItem('TEST');
12931294
} catch(e) {

scripts/bundled-uncompressed/html4+html5/jquery.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ if (typeof JSON !== 'object') {
12631263
console = window.console||undefined, // Prevent a JSLint complain
12641264
document = window.document, // Make sure we are using the correct document
12651265
navigator = window.navigator, // Make sure we are using the correct navigator
1266-
sessionStorage = window.sessionStorage||false, // sessionStorage
1266+
sessionStorage = false, // sessionStorage
12671267
setTimeout = window.setTimeout,
12681268
clearTimeout = window.clearTimeout,
12691269
setInterval = window.setInterval,
@@ -1274,6 +1274,7 @@ if (typeof JSON !== 'object') {
12741274
history = window.history; // Old History Object
12751275

12761276
try {
1277+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
12771278
sessionStorage.setItem('TEST', '1');
12781279
sessionStorage.removeItem('TEST');
12791280
} catch(e) {

scripts/bundled-uncompressed/html4+html5/mootools.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ if (typeof JSON !== 'object') {
12701270
console = window.console||undefined, // Prevent a JSLint complain
12711271
document = window.document, // Make sure we are using the correct document
12721272
navigator = window.navigator, // Make sure we are using the correct navigator
1273-
sessionStorage = window.sessionStorage||false, // sessionStorage
1273+
sessionStorage = false, // sessionStorage
12741274
setTimeout = window.setTimeout,
12751275
clearTimeout = window.clearTimeout,
12761276
setInterval = window.setInterval,
@@ -1281,6 +1281,7 @@ if (typeof JSON !== 'object') {
12811281
history = window.history; // Old History Object
12821282

12831283
try {
1284+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
12841285
sessionStorage.setItem('TEST', '1');
12851286
sessionStorage.removeItem('TEST');
12861287
} catch(e) {

scripts/bundled-uncompressed/html4+html5/native.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ if (typeof JSON !== 'object') {
13071307
console = window.console||undefined, // Prevent a JSLint complain
13081308
document = window.document, // Make sure we are using the correct document
13091309
navigator = window.navigator, // Make sure we are using the correct navigator
1310-
sessionStorage = window.sessionStorage||false, // sessionStorage
1310+
sessionStorage = false, // sessionStorage
13111311
setTimeout = window.setTimeout,
13121312
clearTimeout = window.clearTimeout,
13131313
setInterval = window.setInterval,
@@ -1318,6 +1318,7 @@ if (typeof JSON !== 'object') {
13181318
history = window.history; // Old History Object
13191319

13201320
try {
1321+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
13211322
sessionStorage.setItem('TEST', '1');
13221323
sessionStorage.removeItem('TEST');
13231324
} catch(e) {

scripts/bundled-uncompressed/html4+html5/right.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ if (typeof JSON !== 'object') {
12641264
console = window.console||undefined, // Prevent a JSLint complain
12651265
document = window.document, // Make sure we are using the correct document
12661266
navigator = window.navigator, // Make sure we are using the correct navigator
1267-
sessionStorage = window.sessionStorage||false, // sessionStorage
1267+
sessionStorage = false, // sessionStorage
12681268
setTimeout = window.setTimeout,
12691269
clearTimeout = window.clearTimeout,
12701270
setInterval = window.setInterval,
@@ -1275,6 +1275,7 @@ if (typeof JSON !== 'object') {
12751275
history = window.history; // Old History Object
12761276

12771277
try {
1278+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
12781279
sessionStorage.setItem('TEST', '1');
12791280
sessionStorage.removeItem('TEST');
12801281
} catch(e) {

scripts/bundled-uncompressed/html4+html5/zepto.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ if (typeof JSON !== 'object') {
12601260
console = window.console||undefined, // Prevent a JSLint complain
12611261
document = window.document, // Make sure we are using the correct document
12621262
navigator = window.navigator, // Make sure we are using the correct navigator
1263-
sessionStorage = window.sessionStorage||false, // sessionStorage
1263+
sessionStorage = false, // sessionStorage
12641264
setTimeout = window.setTimeout,
12651265
clearTimeout = window.clearTimeout,
12661266
setInterval = window.setInterval,
@@ -1271,6 +1271,7 @@ if (typeof JSON !== 'object') {
12711271
history = window.history; // Old History Object
12721272

12731273
try {
1274+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
12741275
sessionStorage.setItem('TEST', '1');
12751276
sessionStorage.removeItem('TEST');
12761277
} catch(e) {

scripts/bundled-uncompressed/html5/dojo.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
console = window.console||undefined, // Prevent a JSLint complain
138138
document = window.document, // Make sure we are using the correct document
139139
navigator = window.navigator, // Make sure we are using the correct navigator
140-
sessionStorage = window.sessionStorage||false, // sessionStorage
140+
sessionStorage = false, // sessionStorage
141141
setTimeout = window.setTimeout,
142142
clearTimeout = window.clearTimeout,
143143
setInterval = window.setInterval,
@@ -148,6 +148,7 @@
148148
history = window.history; // Old History Object
149149

150150
try {
151+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
151152
sessionStorage.setItem('TEST', '1');
152153
sessionStorage.removeItem('TEST');
153154
} catch(e) {

scripts/bundled-uncompressed/html5/extjs.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
console = window.console||undefined, // Prevent a JSLint complain
108108
document = window.document, // Make sure we are using the correct document
109109
navigator = window.navigator, // Make sure we are using the correct navigator
110-
sessionStorage = window.sessionStorage||false, // sessionStorage
110+
sessionStorage = false, // sessionStorage
111111
setTimeout = window.setTimeout,
112112
clearTimeout = window.clearTimeout,
113113
setInterval = window.setInterval,
@@ -118,6 +118,7 @@
118118
history = window.history; // Old History Object
119119

120120
try {
121+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
121122
sessionStorage.setItem('TEST', '1');
122123
sessionStorage.removeItem('TEST');
123124
} catch(e) {

scripts/bundled-uncompressed/html5/jquery.history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
console = window.console||undefined, // Prevent a JSLint complain
9494
document = window.document, // Make sure we are using the correct document
9595
navigator = window.navigator, // Make sure we are using the correct navigator
96-
sessionStorage = window.sessionStorage||false, // sessionStorage
96+
sessionStorage = false, // sessionStorage
9797
setTimeout = window.setTimeout,
9898
clearTimeout = window.clearTimeout,
9999
setInterval = window.setInterval,
@@ -104,6 +104,7 @@
104104
history = window.history; // Old History Object
105105

106106
try {
107+
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
107108
sessionStorage.setItem('TEST', '1');
108109
sessionStorage.removeItem('TEST');
109110
} catch(e) {

0 commit comments

Comments
 (0)