RSS

How to check HTML5 Web Storage Support in JavaScript?

26 Jun
HTML5 Data Storage

HTML5 Data Storage

function supports_html5_storage() {
                try {
                    return 'sessionStorage' in window && window['sessionStorage'] !== null;
                } catch (e) {
                    return false;
                }
            }
            alert(supports_html5_storage());
Advertisements
 
2 Comments

Posted by on June 26, 2014 in HTML5

 

Tags: ,

2 responses to “How to check HTML5 Web Storage Support in JavaScript?

  1. conjugar verbos

    September 10, 2014 at 5:58 pm

    Hi, I think your blog might be having browser compatibility issues.

    When I look at your blog site in Safari, it looks fine but when opening in Internet Explorer, it has
    some overlapping. I just wanted to give you a quick
    heads up! Other then that, fantastic blog!

     
    • Rajitha

      September 10, 2014 at 7:55 pm

      Hi, thanks for your feedback.
      IE is a shit browser, As a developer, I do not worry about that though it would really matters in browser compatibility point of view.

       

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: