Created
May 4, 2015 16:49
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