ICEpush
  1. ICEpush
  2. PUSH-386

Improve HTML5 localStorage detection

    Details

      Description

      Following from https://github.com/bridgeit/bridgeit.io.js/issues/20

      Local storage is restricted on iOS. It may not be available on iOS 7 and can be further restricted by browsing in 'Private Mode'. Simple detection of window.localStorage or window.sessionStorage will still report 'true' even when localStorage is forbidden. Because of this, it's recommended to perform an actual test of localStorage before assuming it's ok to use.

        Activity

        Hide
        Mircea Toma added a comment -

        Modified useLocalStorage test function to exercise local storage in order to confirm that it is actually functional.

        Show
        Mircea Toma added a comment - Modified useLocalStorage test function to exercise local storage in order to confirm that it is actually functional.
        Hide
        Carmen Cristurean added a comment -

        scopes sample application can not be run on IE8 after this change:

        A JS error pop up appears when navigating to each of the scopes test pages; after closing the JS error popup, the tests appear to pass (IE8 only, not an issue on IE11/other browsers; not an issue on Jenkins Build # 1867):

        Message: Object doesn't support this action
        Line: 32
        Char: 21
        Code: 0
        URI: http://localhost:8080/scopes/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_2_0_160323

        Message: 'ice.push' is null or not an object
        Line: 1126
        Char: 13
        Code: 0
        URI: http://localhost:8080/scopes/javax.faces.resource/bridge.uncompressed.js.jsf?ln=ice.core&v=4_2_0_160323

        Show
        Carmen Cristurean added a comment - scopes sample application can not be run on IE8 after this change: A JS error pop up appears when navigating to each of the scopes test pages; after closing the JS error popup, the tests appear to pass (IE8 only, not an issue on IE11/other browsers; not an issue on Jenkins Build # 1867): Message: Object doesn't support this action Line: 32 Char: 21 Code: 0 URI: http://localhost:8080/scopes/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_2_0_160323 Message: 'ice.push' is null or not an object Line: 1126 Char: 13 Code: 0 URI: http://localhost:8080/scopes/javax.faces.resource/bridge.uncompressed.js.jsf?ln=ice.core&v=4_2_0_160323
        Hide
        Mircea Toma added a comment -

        Use 'removeItem' function instead of 'delete' operator (not supported by IE8) when removing items from local storage.

        Show
        Mircea Toma added a comment - Use 'removeItem' function instead of 'delete' operator (not supported by IE8) when removing items from local storage.
        Hide
        Carmen Cristurean added a comment - - edited

        ICEfaces4 trunk r48562/icepush r48568 (Jenkins Build# 1881), EE-3.3.0-maintenance branch r48571: verified scopes on IE8/11, FF41/ Tomcat7.0.42.

        Show
        Carmen Cristurean added a comment - - edited ICEfaces4 trunk r48562/icepush r48568 (Jenkins Build# 1881), EE-3.3.0-maintenance branch r48571: verified scopes on IE8/11, FF41/ Tomcat7.0.42.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: