Skip to content

window.sessionStorage throws an exception when cookies are disabled in some browsers #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 commits merged into from
Dec 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/dojo.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1318,6 +1318,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/extjs.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1288,6 +1288,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/jquery.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1274,6 +1274,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/mootools.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1281,6 +1281,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/native.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1318,6 +1318,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/right.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1275,6 +1275,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html4+html5/zepto.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ if (typeof JSON !== 'object') {
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -1271,6 +1271,7 @@ if (typeof JSON !== 'object') {
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/dojo.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -148,6 +148,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/extjs.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -118,6 +118,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/jquery.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -104,6 +104,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/mootools.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -111,6 +111,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/native.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -148,6 +148,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/right.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -105,6 +105,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/bundled-uncompressed/html5/zepto.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
console = window.console||undefined, // Prevent a JSLint complain
document = window.document, // Make sure we are using the correct document
navigator = window.navigator, // Make sure we are using the correct navigator
sessionStorage = window.sessionStorage||false, // sessionStorage
sessionStorage = false, // sessionStorage
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
setInterval = window.setInterval,
Expand All @@ -101,6 +101,7 @@
history = window.history; // Old History Object

try {
sessionStorage = window.sessionStorage; // This will throw an exception in some browsers when cookies/localStorage are explicitly disabled (i.e. Chrome)
sessionStorage.setItem('TEST', '1');
sessionStorage.removeItem('TEST');
} catch(e) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/dojo.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/extjs.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/jquery.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/mootools.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/native.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/right.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html4+html5/zepto.history.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/bundled/html5/dojo.history.js

Large diffs are not rendered by default.

Loading