Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508727

Summary: Consider not using a Timer to send ServerPush
Product: [RT] RAP Reporter: Wolfgang Pedot <wolfgang.pedot>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: ivan, stefan.fink
Version: 3.1   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Wolfgang Pedot CLA 2016-12-06 05:12:05 EST
Right now a Timer(0) is used to send ServerPush-Requests (appearantly as workaround for Bug #353819), this can cause problems with current versions of Safari (10.0.1 tested) because it delays timers very agressively in background tabs. Other browsers usually wait 1sec before executing the call in background tabs and that is not a problem. Safari on the other hand sometimes delays those calls by more than a minute and that can cause problems when using short HTTP session-timeouts.

I have verfied that Safari does not delay the blocking request when not using the timer. If the workaround for 353819 is still required (did not see the issue with Chrome 54 and Safari 10.0.1) there are alternatives to timers which may be feasible here (setImmediate, postMessage,...).
Comment 1 Ivan Furnadjiev CLA 2016-12-07 08:31:11 EST
Is the issue outlined in bug Bug #353819 is still valid with latest Safari (MacOS, iOS)?
Comment 2 Ivan Furnadjiev CLA 2016-12-07 08:34:54 EST
BTW setImmediate is not supported by all browsers - only IE (https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate).
Comment 3 Wolfgang Pedot CLA 2016-12-07 12:37:07 EST
I realize that setImmediate is not cross-browser, I just wanted to mention a few possibilities.

So far I have only tested version 10.0.1 of Safari and I did not see the issue described in #353819. Will also try to test with older versions.
Comment 4 Wolfgang Pedot CLA 2016-12-07 12:46:20 EST
I just tested with Safari 5.1.7 (on Windows) and did not get a loading cursor, not sure if windows-version was not affected or 5.1.7 fixed the issue...
Comment 5 Stefan Fink CLA 2016-12-08 05:22:09 EST
Did a successful test under following conditions:
OS X 10.7.5 (Mac OS Lion latest patches installed)
Safari 6.1.6 (latest available with this OS X version)
Comment 6 Wolfgang Pedot CLA 2017-02-09 04:41:36 EST
I have been running an application that does not use a timer so send ServerPush requests for some time now and I have not received any information about side-effects, not even from Safari users. Appearantly modern browsers do not require the workaround for Bug #353819 any longer.
Comment 7 Ivan Furnadjiev CLA 2017-02-09 04:46:43 EST
Wolfgang, could you check your app (without ServerPush timer) in iOS Safari for the loading cursor issue?
Comment 8 Wolfgang Pedot CLA 2017-02-09 05:41:44 EST
Tested OK on an iPad running iOS 10.2, will also test with 10.2.1 once the update is done.
Comment 9 Ivan Furnadjiev CLA 2017-02-09 05:54:47 EST
(In reply to Wolfgang Pedot from comment #8)
> Tested OK on an iPad running iOS 10.2, will also test with 10.2.1 once the
> update is done.

Thank you very much!
Comment 10 Wolfgang Pedot CLA 2017-02-09 07:00:44 EST
Test with 10.2.1 is also ok, no endless loading cursor
Comment 11 Ivan Furnadjiev CLA 2017-02-09 07:09:03 EST
(In reply to Wolfgang Pedot from comment #10)
> Test with 10.2.1 is also ok, no endless loading cursor

Than I will remove the timer. Thanks for testing.
Comment 12 Ivan Furnadjiev CLA 2017-02-23 03:58:23 EST
The timer has been removed with change https://git.eclipse.org/r/#/c/90832/