Re: Web Storage how to check for support?

> http://dev.w3.org/html5/webstorage/#the-storage-interface
> Web Storage how to check for support?
>
> How can one in a script check for UA support?

How about either of the following, they both worked as expected for me.

   // Check for the Storage interface
   if (window.Storage) { ... }

   // Check for an instance of the interface
   if (window.localStorage) { ... }

- Joe

Received on Monday, 27 July 2009 15:42:20 UTC