Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 7 doesn't support shared web workers #32

Open
drgorb opened this issue Dec 29, 2013 · 7 comments
Open

iOS 7 doesn't support shared web workers #32

drgorb opened this issue Dec 29, 2013 · 7 comments

Comments

@drgorb
Copy link

drgorb commented Dec 29, 2013

as neither iOS nor android support shared workers in the latest version of their browsers (http://caniuse.com/sharedworkers), it would be nice to fallback to dedicated workers instead, as these are supported (http://caniuse.com/webworkers)

@awwx
Copy link
Owner

awwx commented Dec 30, 2013

This is actually a big problem. Dedicated workers won't help because the shared web worker is used to communicate between tabs. In other browsers which don't support shared web workers, the browser windows elect one of their number to act as the agent talking to the server, in effect acting like the shared web worker. This doesn't work on iOS because iOS suppresses timer events in inactive tabs.

For a while we were fine because we had one approach which worked on Android and another approach which worked on iOS. Now with iOS 7 neither of the current approaches works.

@awwx
Copy link
Owner

awwx commented Dec 30, 2013

@Gaelan
Copy link

Gaelan commented Feb 20, 2014

What if you stored the list of pending requests in LocalStorage (or some other shared storage), then polled it from whichever tab was currently active?

@w-A-L-L-e
Copy link

We just started this week with meteor and this news about meteor-offline is actually a showstopper for the framework on mobiles for us. We need an offline mode for the app. It's so close however with a standard single page meteor app. I tested meteor with the parties demo on an android:

made a simple cordova app added the cordova-meteor plugin and just pointed it to my 192.168.1.x:3000 meteor server running in dev mode. And it already actually works almost completely like you want : you can update + add parties both on android and in the browser on the laptop. When offline (wifi off) and it all syncs nicely when you come back online due to latency compensation. So as I see this repo has not had any work on it in the past months due to the shared web workers issue.

Will meteor-offline be possible anytime soon for android+ios? Got any tips or advise to get this working for one or 2 collections alone if the generic way targeted by this plugin is impossible?
Or maybe have something that works accept gives warning event when a merge fails and have it up to the developer to make a seperate screen for this (bit like optimistic locking version fail where you have the user resolve the merge by showing the server version of the mongo record).

@awwx
Copy link
Owner

awwx commented Mar 7, 2014

Hi Walter, I'm not currently working on the offline-data package. I suggest:

@w-A-L-L-e
Copy link

Thanks for the quick reply. Will ask in the groups.

Kind regards,
W.

@whmountains
Copy link

It seems that the HTML5 localStorage API actually sends a notification to all open tabs when one of them changes the data. This would mean that timeout events wouldn't be necessary.

According to http://caniuse.com/#search=webstorage it works in 89.35% of all browsers currently in use including all modern ones.

EDIT: This library facilitates this type of messaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants