Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charisTheo/d6cfd442489b4e40113634dd67bd2093 to your computer and use it in GitHub Desktop.
Save charisTheo/d6cfd442489b4e40113634dd67bd2093 to your computer and use it in GitHub Desktop.
Inject resource hints (preload, prefetch, etc) while auditing a page using WebPageTest scripts. Use the textbox in Script (tab) > Enter Script
navigate https://www.example.com
addHeader Link: <images/example-image.jpg>; rel=preload; as=image
addHeader Link: <https://fonts.gstatic.com>; rel=preconnect
addHeader Link: </next-page-navigation>; rel=prefetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment