How to force Chrome to load the page in an inactive tab?

Hello Guys,
i have a website that send personalized reminders with a sound and vibration the problem is when user in ios or android(chrome or safari or mozilla) switch tabs or close and reopen the browser the website doesn’t send the remiders because the website doesn’t load .
is there a way to fixe the issue

Are you talking about all browsers? Your title specifically mentions Chrome but the post mentions Chrome, Safari and I assume you mean Firefox (Mozilla isn’t a browser).

If you want to open a link in a new tab using JS, you can use something like

link.target = "_blank";

That is if I’ve understood your question correctly.

I think that instead he wants to maintain a constant connection between his server and the phone, even when the tab is different or the browser is closed. There is no JavaScript that can help with that.

I think that as this is primarily a mobile issue, that the people in the Mobile forum might be in a better position to help out with this thread. I’ll move this thread over there.

4 Likes

I don’t know if this is of any use (or indeed relevant) but you can tell when a tab/page becomes active again.

alert('Hello for the first time');
// Handle page visibility change events
function handleVisibilityChange() {
  if (document.visibilityState == "visible") {
  	alert('Welcome back')
	}
}
document.addEventListener('visibilitychange', handleVisibilityChange, false);

Works on my iphone.

i notice that the website in old tabs doesn’t load ,how to force it to load the website?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.