Communication between tabs/windows with same origin [duplicate]

I’m sticking to the shared local data solution mentioned in the question using localStorage. It seems to be the best solution in terms of reliability, performance, and browser compatibility. localStorage is implemented in all modern browsers. The storage event fires when other tabs makes changes to localStorage. This is quite handy for communication purposes. References … Read more

iPhone “Bookmark to Homescreen” removes cookies and session?

A really simple approach could be to use a unique token in your Bookmark-URL which can serve you as a unique device identifier. Example: The token can be generated at the server side at opening time of the application in Mobile Safari and before the user is prompted with the “Add to Home Screen” … Read more

NoClassDefFoundError JsonAutoDetect while parsing JSON object

For those who come here in the future, the answer is: If you’ve only copied jackson core and jackson databind, you need jackson annotations to use the ObjectMapper. For example, make sure you have something like this: [16:32:01]:/android-project/libs master]$ ls -lAF total 2112 -rw-r–r–@ 1 jeffamaphone staff 33525 Jun 18 16:06 jackson-annotations-2.0.2.jar -rw-r–r–@ 1 jeffamaphone … Read more

Cross Domain Resource Sharing GET: ‘refused to get unsafe header “etag”‘ from Response

Only simple response headers are exposed when using CORS. Simple response headers are defined here. ETag is not a simple response headers. If you want to expose non-simple headers, you need to set the Access-Control-Expose-Headers header, like so: Access-Control-Expose-Headers: ETag However, note that I’ve noticed bugs in Chrome, Safari and Firefox that prevent non-simple headers … Read more

Multiple “apple-touch-startup-image” resolutions for iOS web app (esp. for iPad)?

definitive solution for startup-image and touch-icons for iPad and iPhone (landscape || portrait) and (retina || not): <!– iPhone ICON –> <link href=”×57.png” sizes=”57×57″ rel=”apple-touch-icon”> <!– iPad ICON–> <link href=”apple-touch-icon-72×72.png” sizes=”72×72″ rel=”apple-touch-icon”> <!– iPhone (Retina) ICON–> <link href=”apple-touch-icon-114×114.png” sizes=”114×114″ rel=”apple-touch-icon”> <!– iPad (Retina) ICON–> <link href=”apple-touch-icon-144×144.png” sizes=”144×144″ rel=”apple-touch-icon”> <!– iPhone SPLASHSCREEN–> <link href=”apple-touch-startup-image-320×460.png” media=”(device-width: 320px)” … Read more

How can I have list of all users logged in (via spring security) my web application

For accessing the list of all logged in users you need to inject SessionRegistry instance to your bean. @Autowired @Qualifier(“sessionRegistry”) private SessionRegistry sessionRegistry; And then using injcted SessionRegistry you can access the list of all principals: List<Object> principals = sessionRegistry.getAllPrincipals(); List<String> usersNamesList = new ArrayList<String>(); for (Object principal: principals) { if (principal instanceof User) { … Read more

How can a web application send push notifications to iOS devices? [closed]

To be more specific, in order for a web application to send push notifications to a mobile device, such as the iPhone, the mobile device must have registered to receive push notifications for a particular application. The registration for push notification is done through a native app and can only be performed through a native … Read more