Browser needs updating

08-May-2020 06:27

put it on a simple interval and raise a custom event when the results change.Example: jsfiddle.net/59utucz6/1 I started off using the community wiki answer, but realised that it wasn't detecting alt-tab events in Chrome.My idea is to count up in a loop and reset the counter if an event fire.If the counter reach a limit I do a to an other page. Just wanted to add: The question is not clear written.https://dl.dropboxusercontent.com/u/2683925/estante-components/visibility_test2I still haven't tested this with enough browsers.If you can find more info about where this doesn't work, please let me know in the comments below. All the other ways using the visibility api or event based or looking for various levels of user activity/lack of activity become overcomplicated and full of edge cases and holes.

browser needs updating-51

In Offline Web Applications (which is really any HTML5 website) can be used to update the cached version of your website without the need for manually reloading the page.

When the iframe has focus, your blur/focus events don't get invoked at all, and the page Visibility API won't trigger on alt tab.

I built upon @Andy E's solution and implemented this (almost good) solution here: https://dl.dropboxusercontent.com/u/2683925/estante-components/visibility_test1(sorry, I had some trouble with JSFiddle).

Of course it still wouldn't work for users actively looking at the page to watch a video, study an image, etc. If visibility can't be detected, then only focus will be used.

If the user focuses the page, then it will update immediately The page won't update again until 30 seconds after any ajax call /* Perform action every second if visible */ Visibility.every(1000, function () ); /* Perform action every second if visible, every 60 sec if not visible */ Visibility.every(1000, 60*1000, function () ); If you want to act on whole browser blur: As I commented, if browser loose focus none of the suggested events fire.

In Offline Web Applications (which is really any HTML5 website) can be used to update the cached version of your website without the need for manually reloading the page.When the iframe has focus, your blur/focus events don't get invoked at all, and the page Visibility API won't trigger on alt tab.I built upon @Andy E's solution and implemented this (almost good) solution here: https://dl.dropboxusercontent.com/u/2683925/estante-components/visibility_test1(sorry, I had some trouble with JSFiddle).Of course it still wouldn't work for users actively looking at the page to watch a video, study an image, etc. If visibility can't be detected, then only focus will be used.If the user focuses the page, then it will update immediately The page won't update again until 30 seconds after any ajax call /* Perform action every second if visible */ Visibility.every(1000, function () ); /* Perform action every second if visible, every 60 sec if not visible */ Visibility.every(1000, 60*1000, function () ); If you want to act on whole browser blur: As I commented, if browser loose focus none of the suggested events fire.This won't help much in the case that it's already cached—since its cached, the server won't be queried, and thus can't responsd with no-cache.