|
|
@@ -1,11 +1,11 @@ |
|
|
-A timeline of the last four years of detecting good old `window.localStorage`
|
|
|
+A timeline of the last four years of detecting good old `window.localStorage`.
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
#### Jan Lenhart, bless his heart contributed the first patch for support:
|
|
|
|
|
|
October 2009:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/5059daa4674651cd1adc39d902e4f4afa73426cd#L0R413
|
|
|
+[5059daa](https://github.com/Modernizr/Modernizr/commit/5059daa4674651cd1adc39d902e4f4afa73426cd#L0R413)
|
|
|
|
|
|
```js
|
|
|
(typeof window.localStorage != 'undefined')
|
|
|
@@ -14,7 +14,7 @@ https://github.com/Modernizr/Modernizr/commit/5059daa4674651cd1adc39d902e4f4afa7 |
|
|
#### Simplicifations
|
|
|
|
|
|
November 2009:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/15020e75cb21d29e3514570704aabfa2a9c4ca84#L0L419
|
|
|
+[15020e7](https://github.com/Modernizr/Modernizr/commit/15020e75cb21d29e3514570704aabfa2a9c4ca84#L0L419)
|
|
|
|
|
|
```js
|
|
|
!!window.localStorage
|
|
|
@@ -23,7 +23,7 @@ https://github.com/Modernizr/Modernizr/commit/15020e75cb21d29e3514570704aabfa2a9 |
|
|
#### If cookies disabled in FF, exception. Softer detect
|
|
|
|
|
|
December 2009:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/1e0ba919fa1e71172334df3fb37f5c3a07dacc49?w=1#L0R455
|
|
|
+[1e0ba91](https://github.com/Modernizr/Modernizr/commit/1e0ba919fa1e71172334df3fb37f5c3a07dacc49?w=1#L0R455)
|
|
|
|
|
|
```js
|
|
|
!!('localStorage' in window)
|
|
|
@@ -32,7 +32,7 @@ https://github.com/Modernizr/Modernizr/commit/1e0ba919fa1e71172334df3fb37f5c3a07 |
|
|
#### If DOM storage disabled in IE, `window.localStorage` is _present_ but `=== null`.
|
|
|
|
|
|
January 2010:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/d8947c91982b8018e1d119be44d9c3ed85e521b6#L0L580
|
|
|
+[d8947c9](https://github.com/Modernizr/Modernizr/commit/d8947c91982b8018e1d119be44d9c3ed85e521b6#L0L580)
|
|
|
|
|
|
```js
|
|
|
(localStorage in window) && window[localStorage] !== null
|
|
|
@@ -41,7 +41,7 @@ https://github.com/Modernizr/Modernizr/commit/d8947c91982b8018e1d119be44d9c3ed85 |
|
|
#### FF with dom.storage.enabled = false throws exceptions
|
|
|
|
|
|
July 2010:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/ef2c47#L0R633
|
|
|
+[ef2c47](https://github.com/Modernizr/Modernizr/commit/ef2c47#L0R633)
|
|
|
|
|
|
```js
|
|
|
try {
|
|
|
@@ -54,7 +54,7 @@ try { |
|
|
#### more shit because of FF exceptions
|
|
|
|
|
|
December 2010:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/c630c3938f704bfb4153bc939dc2eeee012e34b5?w=1
|
|
|
+[c630c39](https://github.com/Modernizr/Modernizr/commit/c630c3938f704bfb4153bc939dc2eeee012e34b5?w=1)
|
|
|
|
|
|
```js
|
|
|
try {
|
|
|
@@ -68,7 +68,7 @@ try { |
|
|
#### iOS private browsing fucks everyone!!!
|
|
|
|
|
|
October 2011:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/5e2fa0ed336279990b8070726c596d7aa2c00b00
|
|
|
+[5e2fa0e](https://github.com/Modernizr/Modernizr/commit/5e2fa0ed336279990b8070726c596d7aa2c00b00)
|
|
|
|
|
|
```js
|
|
|
try {
|
|
|
@@ -82,7 +82,7 @@ try { |
|
|
#### stronger full capability test for localstorage with iOS private browsing protection
|
|
|
|
|
|
October 2011:
|
|
|
-https://github.com/Modernizr/Modernizr/commit/a93625c21694fcda6fc1514a48f54232f703194a
|
|
|
+[a93625c](https://github.com/Modernizr/Modernizr/commit/a93625c21694fcda6fc1514a48f54232f703194a)
|
|
|
|
|
|
```js
|
|
|
try {
|