Skip to content

Firefox Continually Refreshing Pages #202

@KZeni

Description

@KZeni

I've noticed that Firefox is continually refreshing on various pages of my site (after the "Allow Notifications" prompt is shown, but it refreshes before the user can really act on that prompt). I'm thinking it's tied to the

let refreshedPage = false;
navigator.serviceWorker.addEventListener( 'controllerchange', () => {
	if ( ! refreshedPage ) {
		refreshedPage = true;
		window.location.reload();
	}
} );

snippet added to the page by PWA.

Oddly, the homepage is pretty much the same as the other pages having the refresh issue (also having this same code snippet), but it's happily not refreshing again & again with the "Allow Notifications" prompt to be acted on.

Any idea of what might be the fix for this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions