JustZix works on dynamic (SPA) pages without an F5
More and more sites are single-page applications (SPAs): you click, the address bar changes, but the page does not load again. JustZix used not to notice such changes — rules matched to a URL path only appeared after an F5. This post explains what changed and why it matters.
What navigation without a reload means
On a classic site every transition is a fresh document load. An SPA instead swaps content on the fly and updates the address through history.pushState or replaceState. That is how the Google Ads panel, many admin dashboards and modern web apps work.
The problem: rules „frozen” on the first URL
JustZix matches rules to a URL pattern. Since the on-page script only checked the URL on the DOMContentLoaded and load events, the match was not refreshed after navigating within an SPA. The floating button, action bars, on-page windows and injected CSS only appeared or disappeared after a manual page reload.
The fix: three detection channels
The extension now detects SPA navigation through three channels: the popstate and hashchange events and an observer of document changes. They all funnel into a single cheap guard comparing location.href — rule matching only re-runs when the address actually changed, so it does not burden the page.
What it gives you in practice
Rules matched to a specific path — for example only /campaigns in an ad panel — turn on and off as you click around the app, with no F5. The same applies to action bars and windows pinned to a URL pattern.
Tip: write SPA-resilient JS rules
The extension itself now reacts to address changes, but your own JS code should too. If a rule modifies elements that the SPA renders later, wrap the logic in a MutationObserver so it works after content loads in as well:
// Run after the SPA loads content in too
function applyTweak() {
document.querySelectorAll('.widget').forEach(el => {
el.style.outline = '2px solid #006870';
});
}
applyTweak();
new MutationObserver(applyTweak).observe(document.body, {
childList: true, subtree: true,
});
Benefits
Rules work right away, with no manual reload. Behaviour is consistent on SPA panels — Google Ads, admin dashboards and web apps. And URL-path matching is finally fully reliable.
Ready-made rules for many sites are in the examples catalog. Install JustZix and test your rules on any SPA.
Rate this post
No ratings yet — be the first.