Updating pages only when visible

As part of my attempt to lower bandwidth usage with emoncms, I am wondering whether it is possible to use the Page Visibility JS method, to stop the pages updating and calling when not targeted?

I like to leave the page open in the background, but there’s not really any point of it actually updating when not targeted.

I know it doesn’t seem a lot, but I host my emoncms on AWS and bandwidth costs money. Here are my stats so far this month … (hopefully I’ve reduced the post.json as have migrated to mqtt_input)

Any reason, I shouldn’t look into working on this?

Here is an example of page visibility …

1 Like

The example, quite brilliant, also looks ideal for stopping bandwidth wastage …


1 Like