Auto-refresh pages on startup before ad blocker is initialized
Feature Summary
Add automatic page refresh functionality after extension initialization to prevent ad blocks from showing during browser startup.
Description
When the browser starts or a PWA is launched, pages can load before the ad blocker is fully initialized. This allows ads to slip through, which harms the user experience. This feature will implement an automatic page refresh that triggers once the ad blocker is ready.
This will address a long-standing request from both users and filter developers to handle cases where content is loaded before filtering becomes active.
Acceptance Criteria
- After initialization, the extension should automatically refresh the active tab.
- When switching to an existing tab, the extension should refresh it if the page was loaded before filtering was active.
- To prevent double reloads, the extension must not refresh a tab that the browser is already reloading (e.g., restoring from a discarded state).
- The feature must work correctly in Chrome for both standard tabs and PWAs.
- No infinite refresh loops occur.
To add to this, I also recommend to add an option to delay loading of pages altogether until the ad blocker is initialized just like in uBlock, rather than reloading. I don't mind a slower startup if it was meant to give a better experience.
Both ways can be implemented but I think delaying would better from a UX standpoint.
I do also experience ads when starting the browser from PWA shortcut or when quickly navigating to a site while the blocker is not yet initialized.
@caulmseh I'm with you 100%, i already request this https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2809 I really hope they done it the right way, not just the simple workaround.