summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-07 12:54:43 +0300
committerAndrew Dolgov <[email protected]>2010-11-07 12:54:43 +0300
commitff0010c182c1643cc5e0c516e95ed50e18004068 (patch)
treeeb87cb47d41627c7b1d0671dfc2ef272cc74be40 /functions.js
parent50eefedbfd2f31be4054746bbcec7d8e05c0a2dd (diff)
implement html5 localStorage support for client-side cache
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/functions.js b/functions.js
index 2aa0dab4f..8b4945edc 100644
--- a/functions.js
+++ b/functions.js
@@ -2184,3 +2184,10 @@ function backend_sanity_check_callback(transport) {
}
}
+function has_local_storage() {
+ try {
+ return 'localStorage' in window && window['localStorage'] != null;
+ } catch (e) {
+ return false;
+ }
+}