Monday, October 17, 2011

iOS5 in Private Browsing Mode

I love feature detection. Sometimes it fails you in a really unfortanate way.
Two examples of late


> window.localStorage
 ▶ StorageConstructor

> window.localStorage.setItem('foo', 'bar')
> Error: QUOTA_EXCEEDED_ERR: DOM Exception 22



Q: Guess what most libraries do to detect support?

A: if ('localStorage' in window)


Well, nothing a try catch can't fix.

/facepalm

Sunday, October 16, 2011

Hide the Mother Effing URL Bar

The should be an API for mobile browsers to do this. Can I get an amen?