Copy link to clipboard
Copied
The Premiere Panel extension I built is hosting a HTML page in an iframe.
This page is located on my server and every once in a while I'm updating the HTML page with new features or bug fixes.
I want to request the users to refresh the panel when there is an updated version in my cloud, to avoid the schnario of old page related errors for users that are not closing and reopening the PPro for a long time.
One way to solve it can be using long polling to my server with the current HTML version but I wonder if there is a better solution.
Perhaps your panel could check for new HTML once every N minutes; when an update is available, turn the panel background red (or something), and offer an "update" button as appropriate...
Copy link to clipboard
Copied
You say 'every once in a while'; is it not enough, to refresh the panel's contents each time the panel is opened?
Copy link to clipboard
Copied
Thank you Bruce Bullis for reply.
The way it's work is like that, I'm updateing the HTML file once a week approx. Some of the clients that are working with the PPro leave it open all the time so I don't get a chance to update the content, I need a way to notify them that they are runnig an old version of the panel and that they need a refresh.
Copy link to clipboard
Copied
Perhaps your panel could check for new HTML once every N minutes; when an update is available, turn the panel background red (or something), and offer an "update" button as appropriate...
Copy link to clipboard
Copied
The solution that worked for me was to compare the html version to the html version in the server when the panel get focus.
The inspration came from this thread.
<head>
<script>
window.onfocus = () => {console.log("FOCUSED!");};
window.onblur = () => {console.log("BLURRED!");};
</script>
</head>