web-monetization-extension icon indicating copy to clipboard operation
web-monetization-extension copied to clipboard

[IMPROVEMENT] Optimisation for prerendered pages

Open dianafulga opened this issue 1 year ago • 1 comments

For the moment we won't execute the content script when the browser prerenders the pages before the user actually navigates to them. This was implemented with #477

For optimisation we want to save the details of the links when a page is prerendered, so that when actually navigating to the page, the payments are done much faster. Started working on this in this PR . For this approach, we need to:

  • clear the preloaded urls, that are not used, because the user changes the url

dianafulga avatar Aug 06 '24 08:08 dianafulga

Also see: https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API

sidvishnoi avatar Aug 06 '24 08:08 sidvishnoi

@sidvishnoi another issue to see if it's still relevant

RabebOthmani avatar Aug 05 '25 11:08 RabebOthmani

Too much work to handle this with little benefit, and can make extension less reliable. Let's close it.

Benefit: we might be able to start monetization like 200-400ms earlier.

sidvishnoi avatar Aug 05 '25 11:08 sidvishnoi