Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  15 Nov 2019, Andreas Suter, Suggestion, javascript comunication 
    Reply  15 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
       Reply  17 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
          Reply  18 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
             Reply  18 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
    Reply  17 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
       Reply  18 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
Message ID: 1735     Entry time: 15 Nov 2019     In reply to: 1733     Reply to this: 1738
Author: Stefan Ritt 
Topic: Suggestion 
Subject: javascript comunication 
Very good idea. And thanks for finding the document.hidden solution. I put it in, so give it a try.

Best,
Stefan


> I am currently testing the new history system on the mhttpd side and stumbled over the following issue: typically our user open a lot of midas web-page tabs and keep them open. With the current version this leads after a night typically to a state where the browser is busy with itself and not reacting anymore.
> 
> One important reason seems to be that ALL tabs trying to communicate all the time which is totally unnecessary, since I think a hidden tab should stay in a sleeping mode. 
> 
> I was browsing if there is a way to find out if a tab is active or not, and found the following API which exactly does this:
> 
> https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
> 
> Furthermore, the simple
> 
> document.hidden 
> 
> tag, could be used to find out if the page is currently active.
> 
> Wouldn't it a good idea to send all midas tabs which are not active into a sleep mode and only reactivate them if they come into focus?
> 
> I had a quick look at the JavaScript libs of midas, but I am not quite certain where to best inject this. 
ELOG V3.1.4-2e1708b5