Preload Links

🚀 Available from WP Rocket 3.7

In this Article

About this feature

Preloading links will improve the perceived loading time of pages for a user navigating your site. If a user hovers over, or touches, a link for 100ms or more, the HTML of that page will be fetched in the background, so that when they actually click the link, the page will appear to load nearly instantly!

This option only improves the user experience and perceived load time - you will not notice any difference in your PageSpeed score or loading time as measured by Pingdom, GT Metrix etc.

This optimization is applied on all pages - both cached and uncached.

Heads up! This feature is supported by Chrome and Chromium-based browsers. Other browsers may support this feature in the future.

Preloading links in action

The gif below demonstrates this feature in action:

Automatic exclusions

We automatically exclude some URLs from this feature to prevent unexpected results:

  • Any URL from wp-admin, login/logout
  • URLs excluded from cache by WP Rocket configuration
  • Images
  • Links with a query string or an anchor
  • External URLs

Manual exclusions

You can manually exclude URLs from this feature by adding a snippet like this to your theme's  functions.php file:

add_filter( 'rocket_preload_links_config', 'rocket_exclude_preload_links');

function rocket_exclude_preload_links( $config ) { 
	$config['excludeUris'] = '';
	$config['excludeUris'] = '';
	return $config;

You can add as many URLs as you want in $config['excludeUris'], to add more exclusions you can add as many lines as you need, one per URL.

Plugin compatibility

This feature replaces the need for the following plugins and if they are detected, you will be prompted to deactivate them:

  • Flying Pages
  • Quicklink
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.