Browser & Web Performance · Middle · Question 37 of 75
What does the Speculation Rules API allow?
<script type="speculationrules">
{ "prerender": [{ "where": { "href_matches": "/product/*" }, "eagerness": "moderate" }] }
</script>- 1Running JavaScript speculatively on a worker
- 2Predicting the user's next click with machine learning on the server
- ✓Correct answer: Declaratively prefetching or prerendering likely next pages so navigations become near-instant
Explanation
Prerendering loads and renders the page in the background. eagerness controls when, e.g. on hover for moderate.