Quicklink Integration
Quicklink is a JavaScript library that prefetches (and optionally prerenders) links as they enter the viewport. ZiziCache integrates Quicklink on the frontend when enabled and uses it as a primary solution or as a fallback for Speculation Rules.
How ZiziCache chooses between Quicklink and Speculation Rules
- Speculation Rules configured + supported: Quicklink is skipped and the native API is used.
- Speculation Rules configured + not supported: Quicklink runs as a fallback.
- Speculation Rules not configured: Quicklink runs as the primary solution.
Modes
- Prefetch – fetches resources for visible links.
- Prerender – renders full pages in the background (when supported by the library).
- Both – prerender and prefetch together.
Controls and limits
- Throttle – concurrent request limit (1-10).
- Limit – maximum total prefetch requests (1-50).
- Delay – wait time before prefetching (0-5000 ms).
- Timeout – request timeout (500-10000 ms).
- Threshold – viewport intersection threshold (0-100%).
- Priority – raises priority for prefetched resources.
Network awareness
- Can respect Data Saver mode (skip prefetch when enabled).
- Can enforce a minimum connection type (e.g., 3G or 4G).
Origins and ignores
- Origins allowlist: empty list means same-origin only.
- Default ignores include
/wp-admin/*,/wp-login.php, feeds, and common file types (PDF/ZIP/DOC/XLS). - WooCommerce dynamic pages (cart/checkout/account) are ignored automatically.
- Custom ignore patterns are supported. Wildcards (
*) become regex rules; a leading dot (e.g.,.pdf) targets file extensions; otherwise it matches by substring. - Optional ad/affiliate blocking adds common ad URL patterns plus your custom patterns.
Analytics guard for prerender
If prerendering is enabled and the analytics guard is active, ZiziCache injects a guard that blocks GA and Facebook Pixel during prerender. Custom guard code is also supported.
Best practices
- Start with prefetch mode and conservative limits, then adjust.
- Use ignore patterns to exclude login, checkout, and personalized pages.
- Test on mobile and slower networks to confirm acceptable bandwidth usage.
Troubleshooting
- Quicklink not running: Check if Speculation Rules are enabled and supported (Quicklink will be skipped).
- No prefetching: Verify network conditions (Data Saver or slow connection can disable it).
- Unexpected URLs: Add ignore patterns or restrict origins.