Created
May 4, 2015 16:49
-
-
Save budparr/103dcd0f3dbd6615761b to your computer and use it in GitHub Desktop.
Webhook Prefetch for Prev/Next items
This file contains 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
Place this in your head. | |
{% block head_extra %} | |
{% set prev = prevItem(item, 'publish_date', true) %} | |
{% set next = nextItem(item, 'publish_date', true) %} | |
{% if prev %} | |
<link rel="prefetch" href="{{ url(prev) }}" /> | |
{% endif %} | |
{% if next %} | |
<link rel="prefetch" href="{{ url(next) }}" /> | |
{% endif %} | |
{% endblock %} | |
and some tutorials | |
http://davidwalsh.name/html5-prefetch | |
https://medium.com/@luisvieira_gmr/html5-prefetch-1e54f6dda15d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment