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

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Fix Version/s EE-4.1.0.GA [ 12172 ]
        Mircea Toma made changes -
        Affects Version/s 4.1 [ 11570 ]
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mircea Toma made changes -
        Fix Version/s EE-3.3.0.GA_P04 [ 12271 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #48536 Tue Mar 22 05:47:33 MDT 2016 mircea.toma PUSH-386 Exercise local storage to confirm that is actually functional.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/javascript/application.js
        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
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #48565 Tue Mar 29 05:44:09 MDT 2016 mircea.toma PUSH-386 Use 'removeItem' function instead of 'delete' operator (not supported by IE8) when removing items from local storage.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/javascript/application.js
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Carmen Cristurean made changes -
        Comment [ ICEfaces4 trunk r. 48571: scopes application, or any application using icepush, cannot be installed due to server errors (Tomcat7.0.42/8.0.21):

        Mar 29, 2016 9:04:48 AM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Skipped installing application listeners due to previous error(s)
        Mar 29, 2016 9:05:02 AM org.apache.catalina.core.ApplicationContext log
        INFO: ContextListener: contextInitialized()
        Mar 29, 2016 9:05:02 AM org.apache.catalina.core.ApplicationContext log
        INFO: SessionListener: contextInitialized()
        Mar 29, 2016 9:05:02 AM org.apache.catalina.core.ApplicationContext log
        INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@64d0dd5c')
        Mar 29, 2016 9:06:03 AM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Error configuring application listener of class org.icepush.DatabaseConfigurator
        java.lang.NoClassDefFoundError: Lcom/mongodb/MongoClient;
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
        at java.lang.Class.getDeclaredFields(Class.java:1806)
        at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
        at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache(DefaultInstanceManager.java:302)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:161)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:143)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
        Caused by: java.lang.ClassNotFoundException: com.mongodb.MongoClient
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
        ... 20 more ]
        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.
        Carmen Cristurean made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s EE-4.1.0.BETA [ 13073 ]
        Ken Fyten made changes -
        Fix Version/s 4.2.BETA [ 13092 ]
        Fix Version/s 4.2 [ 12871 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #50732 Thu Feb 23 14:12:02 MST 2017 mircea.toma PUSH-386 Back-port fixes.
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-core-4.x-maintenance/icepush/core/src/main/javascript/application.js
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: