https://www.docuseal.com/blog/make-any-website-load-faster-with-6-lines-html DocuSeal 9k9k Solutions * Document Signing API To build automations and workflows Embedding To Seamlessly integrate document signing Enterprise Explore our enterprise solutions On-premises Self-hosted DocuSeal on your own servers HTML to Document To create unique fillable documents React Document Signing To embed document signing in React App Document Signing for SaaS To integrate document signing in your SaaS All Solutions To explore more opportunities Resources * Compliance Learn about how we follow eSign standards Blog Stay updated with our latest articles API Reference Explore our API endpoints and webhooks Documentation Find answers and learn about the features Developer Guides Development guides and examples How-To's User tutorials and resources GDPR Explore our GDPR-ready EU Cloud Qualified Electronic Signature Sign with the highest level of trust Pricing For Developers Sign in Get Started * Sign in * Pricing * For Developers New * Solutions + Document Signing API + Embedding + Enterprise + On-premises + React Document Signing + Document Signing for SaaS + All Solutions * Resources + Compliance + Blog + API and Webhooks + Documentation + GDPR * Contact Ask AI - All posts Make any website load faster with 6 lines of HTML July 31, 2025 * Written by Pete Matsyburka ( ) Copy Copied Put this HTML tag into the of your website for near-instant navigation. Ever clicked a link and had the next page appear almost instantly? That magical, speedy experience is becoming easier to achieve thanks to the Chrome Speculation Rules API. This new browser feature helps make navigation feel instant with just a few lines of HTML. How does it work? The Chrome Speculation Rules API allows developers to declaratively tell the browser which pages to preload and prerender, providing a near-instant loading experience: * "prefetch" tells the browser to only download the top-level HTML document for a linked page. It doesn't render the page or fetch its sub-resources. This is less resource-intensive than prerendering but still saves time by having the HTML ready in the cache. * "prerender" instructs the browser to not only download a page but also to fully render it in a hidden, background process. This includes fetching all sub-resources like CSS, JavaScript, and images, and executing the JavaScript. When the user clicks the link, the page can be swapped into view almost instantly. * "eagerness": "moderate" is interpreted by browsers as: "Start the action 200ms after the user hovers their mouse over a link." Speculation Rule Performance Here's a typical scenario: * A user is reading a page on your website. * They move their mouse cursor and let it rest over a link (e.g., "Services"). * The browser interprets this hover as a sign of intent. After a very brief delay (e.g., ~200 milliseconds, to avoid firing on accidental mouse-overs), it triggers the prerender or prefetch action for the "Services" page. * If the user then clicks the link, the page is already loaded (or at least partially loaded) in the background, resulting in a near-instant navigation. Previously, for the docuseal.com website, we used Hotwired Turbo to achieve SPA-like navigation and to preload pages when hovering over links. Now, our website implements speculation rules, which allowed us to remove the Hotwired Turbo dependency and load heavy pages faster through prerendering. Limitations Speculation Rules API is supported only in Chrome 121 and later versions. Speculation Rule Limitations For Firefox and Safari users, we created a short script to preload pages on hover so that they can be cached by the browser and reused once the hovered link is clicked. This also allows for near-instant navigation on browsers that do not support the Speculation Rules API. Heavy pages like the API might take a bit longer to load comparing to Chrome due to the lack of a pre-rendering mechanism natively supported by other browsers. ( ) Copy Copied In order for this script to work on Firefox and Safari, pages should contain a Cache-Control header with a max-age value so that the preloaded page is cached on hover and then reused on link click. SOC Contact Us Solutions * Sign Documents Online * Document Signing API * Enterprise * Embedding * HTML to Document * Accept Payments * On-premises * HIPAA Compliance * SOC 2 Compliance * 21 CFR Part 11 Compliance * SaaS Integration Resources * API and Webhooks * Documentation * Developer Guides * User Resources * GDPR-ready EU Cloud * Best eSignature APIs * Qualified Electronic Signature * FAQ * Signature Maker * WordPress Integration For Developers * Sign PDF with React * Sign PDF with Vue * Sign PDF with Angular * Sign PDF with Next.js * Sign PDF with PHP * Sign PDF with JavaScript * Sign PDF with Python * Sign PDF with Ruby * Sign PDF with Java * Sign PDF with C# * Sign PDF with Kotlin * Sign PDF with Flutter Company * Pricing * Blog * About Us * Compliance * eSign Disclosure * Security * Privacy Policy * GDPR * Terms and Conditions * Trust Center Community * Discord server * Twitter account * Bluesky * GitHub * Contact Us * Status DocuSeal (c) 2025 DocuSeal LLC 332 S Michigan Ave, Suite 121 #5896, Chicago IL 60604