[client][js] detect localStorage properly before use to avoid access denied exception
Merge pull request #379 from hasankhan/jsstorage

[client][js] detect localStorage properly before use to avoid access denied exception