Skip to content

Instantly share code, notes, and snippets.

@adamzr
Created May 24, 2016 21:33
Show Gist options
  • Save adamzr/0c4e14999263aa4854b91f9245e16de8 to your computer and use it in GitHub Desktop.
Save adamzr/0c4e14999263aa4854b91f9245e16de8 to your computer and use it in GitHub Desktop.
Add Link headers to preload content
<IfModule mod_headers.c>
Header add Link "</service-worker.js>; rel=preload;"
Header add Link "</favicon-16x16.png>; rel=preload;"
Header add Link "</favicon-96x96.png>; rel=preload;"
Header add Link "</android-chrome-192x192.png>; rel=preload;"
Header add Link "<https://cdn.ampproject.org/v0.js>; rel=preload; crossorigin"
Header add Link "<https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface>; rel=preload; crossorigin"
Header add Link "<https://cdn.ampproject.org/v0/amp-analytics-0.1.js>; rel=preload; crossorigin"
Header add Link "<https://cdn.ampproject.org/v0/amp-install-serviceworker-0.1.js>; rel=preload; crossorigin"
Header add Link "<https://fonts.gstatic.com/s/abrilfatface/v8/X1g_KwGeBV3ajZIXQ9VnDgYWpCd0FFfjqwFBDnEN0bM.woff2>; rel=preload; crossorigin"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment