-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Open
Labels
Description
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
Bootstrap's docs are already very fast as they are static HTML, but page load performance can be further improved with a tiny snippet of code in the <head>. This only works in Chromium browsers at moment but I think it's a nice progressive enhancement. I use it on all sites I work on.
<script type="speculationrules">
{
"prerender": [{
"where": {
"href_matches": "/*"
},
"eagerness": "moderate"
}]
}
</script>Further reading:
- https://developer.chrome.com/docs/web-platform/prerender-pages
- https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API
- https://caniuse.com/mdn-html_elements_script_type_speculationrules
Motivation and context
Even faster docs!