Created
January 7, 2018 01:44
-
-
Save davidgilbertson/132497d7e0a9a815b150e35d44660893 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const linkEl = document.createElement('link'); | |
linkEl.rel = 'prefetch'; | |
linkEl.href = urlWithYourPreciousData; | |
document.head.appendChild(linkEl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a link to a w3c issue that got raised a day after this hackernoon article was published. The issue is resolved in another one. In summary, there's a
prefetch-src
directive that defaults todefault-src
.