TL;DR: Better Resource Hints will make your WordPress site faster using modern, performance-enhancing resource hints supported by most of today's …
Author: | Alex MacArthur (profile at wordpress.org) |
WordPress version required: | 4.0 |
WordPress version tested: | 5.0.3 |
Plugin version: | 1.1.3 |
Added to WordPress repository: | 10-05-2018 |
Last updated: | 12-02-2019
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 3 |
Plugin URI: | |
Total downloads: | 10 042 |
Active installs: | 300+ |
Click to start download
|
Screenshots
FAQ
What about browsers that don’t support these resource hints?
If someone’s using an older browser that doesn’t support these hints, nothing will break. The generated tags will just be skipped over and the page will load as normal. The one slight exception to this is preloading CSS. Because the original link
tags are completely converted to rel="preload"
, there would be nothing on which to fall back. To remedy this, a small polyfill is included by this plugin, so you can be at ease.
How can I test my site’s performance to verify improvements?
To start, I’d recommend Google Lighthouse. It’s built into Google Chrome and there’s also a command line utility available. Beyond that, you could try out something like WebPagetest or a more enterprise solution like SpeedCurve.
How can I specifically verify that preloading is working?
First, ensure that your source code contains <link rel="preload" ... >
tags. Then, in Chrome, inspect the page and open up the Network tab. Refresh the page, and filter for your JS files to make things a little easier. Preloaded assets will have a “Priority” of “High.”
How can I verify that prefetching is working?
Remember, this is different from dns-prefetch
, and will download assets in the background as to cache them for future use. To verify a resource is being prefetched, first ensure that your source code contains <link rel="prefetch" ... >
tags. Then, in Chrome, inspect the page and open up the Network tab. Refresh the page, and filter for your JS files to make things a little easier. Prefetched assets will have a “Priority” of “Low.”
How can I verify HTTP/2 server push is working?
First, ensure your server is configured to support server push. Then, you can use Chrome’s net internals to inspect each HTTP/2 session and which assets are being pushed. Navigate to chrome://net-internals/#http2
in Chrome to view this information.
ChangeLog
1.0.0
1.1.0
- Introduce support for generating preconnect hints.
- Improve user interface.
- Improve documentation.
1.1.1
- Append plugin version to admin assets to ensure they’re not cached after updates.
- Fix miscellaneous UI-related bugs appearing in the admin.
1.1.2
- Fix bug causing duplicate preload links being generated for some assets.
- Fix bug causing preconnect links to have incorrectly formatted
href
values.
- Fix typos in documentation.
1.1.3
- Add fallback for cases when no assets are registered.
- Clean up plugin code structure.
- Switch from yarn to npm for JS package management.
- Update preload polyfill for CSS preloading.
- More intelligently load preload polyfill.