-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚡ Optimize the purchase flow by prefetching and preconnecting from/to ti.to #112
Conversation
d4cc95f
to
3e9b6bb
Compare
if (Date.now() > new Date('2018-07-01').getTime()) { | ||
return; | ||
} | ||
addLink('prefetch', 'https://ti.to/jsconfeu/jsconf-eu-2018'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Does prefetch have a positive effect on (html) resources with max-age set to 0?
Aren't cache headers respected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefetch has special caching semantics and allows using the resource once within 5 minutes (or something like that) even if it has expired per its max-age
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Are you aware of any document describing that behavior? Could not find it here: https://w3c.github.io/resource-hints/#prefetch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not aware, but it definitely works :)
CC @igrigorik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robin-drexler @cramforce indeed, works in Blink-based browsers.. Not 100% on other browsers. This is an un-specced corner of the platform, see: w3c/preload#97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to you both. :)
… ti.to Prefetches the main doc and known sub resources whenever a doc finishes loading. On mouseover and click of the purchase button, preconnects to ti.to and other origins that ti.to uses to flatten the connection tree.
3e9b6bb
to
5c0dbd4
Compare
Prefetches the main doc and known sub resources whenever a doc finishes loading.
On mouseover and click of the purchase button, preconnects to ti.to and other origins that ti.to uses to flatten the connection tree.