Skip to content

Instantly share code, notes, and snippets.

@gnanet
Forked from adamzr/.htaccess
Created September 24, 2017 22:25
Show Gist options
  • Save gnanet/550024716da6d9b4b94b4733f7e1555e to your computer and use it in GitHub Desktop.
Save gnanet/550024716da6d9b4b94b4733f7e1555e 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