What actually happens with my Comets here, when not active with the browser tab?

13 views
Skip to first unread message

Henrik Härkönen

unread,
Mar 18, 2018, 11:58:55 AM3/18/18
to Lift
Hi!

I made this comet component for my page, where the page is updated every 5 seconds and also the comet sends a JS call to trigger resolving of geolocation from the browser and then
it send it to my rest helper api via POST ajax call.

I noticed that when I go to another browser tab (in Chrome) for a while, the comet polling seems to be happening, but the location api is not called, until I switch back to the tab, 
and then the pending calls are all made straight away.

Here's a screen capture of the network traffic:


Does the browser block the rest api calls, or what actually is going on here? Normally the comet polling and loc api call goes hand in hand.

-Henrik

Henrik Härkönen

unread,
Mar 18, 2018, 12:12:53 PM3/18/18
to Lift
Ok, never mind, it was the geolocation api that blocked the whole thing! So it wasn't comet related at all...

And weird thing is that it doesn't block it anymore with more parameters, like error callback, and {maximumAge:60000, timeout:5000, enableHighAccuracy:true}... 

-Henrik
Reply all
Reply to author
Forward
0 new messages