Skip to content
  • Thomas Steur's avatar
    21ec2fac
    refs #6545 do not request live information in case tab is not active · 21ec2fac
    Thomas Steur a rédigé
    At first I used the window.blur/focus events but noticed it would also
    stop refreshing if tab is active but browser window is not active. I
    reckon many people might want to leave the browser open in one window
    and follow the live visitors while working on something else. That's
    why we should use the page visibility API which is supported by most
    browsers (I think not in <= IE9). I used a different library first
    but noticed it adds many event listeners like mousemove etc and it can
    make Piwik slow so used the visibility.js library in the end. If someone
    uses an old browser nothing will change compared to before so that
    should be ok. In a next version we could initiate a refresh immediately
    once the browser tab becomes active again.
    21ec2fac
    refs #6545 do not request live information in case tab is not active
    Thomas Steur a rédigé
    At first I used the window.blur/focus events but noticed it would also
    stop refreshing if tab is active but browser window is not active. I
    reckon many people might want to leave the browser open in one window
    and follow the live visitors while working on something else. That's
    why we should use the page visibility API which is supported by most
    browsers (I think not in <= IE9). I used a different library first
    but noticed it adds many event listeners like mousemove etc and it can
    make Piwik slow so used the visibility.js library in the end. If someone
    uses an old browser nothing will change compared to before so that
    should be ok. In a next version we could initiate a refresh immediately
    once the browser tab becomes active again.
Chargement en cours