Hey Guys,
Is there any way to refresh a page in bubble which remains inactive for long time in a brower and when a user uses it again it refreshes first?
Hey Guys,
Is there any way to refresh a page in bubble which remains inactive for long time in a brower and when a user uses it again it refreshes first?
You can create a simple javascript code to track user’s mouse position.
Save this position in some custom state.
If in 5 minutes, ths position is the same as before, you know that the user don’t even moved the mouse. So you refresh the page.
what if the user is active on another page but not on this and when he comes back to that tab at that time I guess the mouse would have been moving and this wont work
Maybe a script can have intention to track only for specific tab or window?
My issue is:
I am showing booking slots in my booking page which takes it input from Google caledr access token. It expires in 1 hr.
Now I want if a user opens the booking page and leaves it inactive for a long time then whenever he comes back the page automatically refreshes for refresh token to again trigger and provide a new access token.
How to achieve this?
Currently its like this but its not working on page being inactive and me again coming back and using this page.
Need to refresh page in order for it to work.
I don’t think the script will run if you are in another tab.
Hi! Bubble won’t auto-refresh a page just because it’s been idle, but you can handle it yourself. The usual approach is to run a workflow on page load that checks how long it’s been since the user last visited, then refresh if the time gap is large. Another option is using a small repeating workflow or the “Do every X seconds” action to detect inactivity and trigger a refresh when the user comes back.
You don’t need to refresh the page. Put automatic fetch of new access token when it is expired. Google api data will tell you as it’s expired, so if it is fetch a new one.
I made a queue display that ran for 12 hours.
I ran a clientside WF so the page doesn’t timeout and cuts off connection to live data. All it did was to uptick a state every minute.
Edit: just read the later post.
This