Lurker News

Comments (337) 70 threads

Earlier comments
elliotec1 reply#
If you like to hyper optimize your site like me, and since it doesn't do any good on mobile (Edit: apparently it works on mobile, ignore this), you can have it selectively grab the script on desktop and save a few bytes like this:

eridius#
The site claims it works on mobile

> On mobile, a user starts touching their display before releasing it, leaving on average 90 ms to preload the page.

rhacker#
It does mean we're trusting your service - we're executing your JS on our sites. But I do like that you're putting in the SHA hash so that we know you're not fudging it.

Just found that you have the source available too :) So overall, this is pretty cool.

chiefalchemist1 reply#
I looked (quickly) through most of the comments below and couldn't answer these questions:

1) What, if anything, is the downside here?
2) Is (Google) analytics effected by the prefetch? That is, does that get counted as a page visit if the link that triggers this prefetch is not actually clicked?
Tia

dieulot2 replies#
The downside is that your pages’s HTML are loaded twice as much, this makes for additional load on your server.

Client-side analytics like GA aren’t affected.

SheinH#
If your html is gzipped, that's in the double digits of kilobytes for most cases. That's nothing compared to images and other content.
Semaphor1 reply#
> The downside is that your pages’s HTML are loaded twice as much

How? It would load the HTML just as often and not download it a second time as that would invalidate the usage
> this makes for additional load on your server.
True for users who hover over links they decide not to visit
Or am I misunderstanding something here?

Zarel#
> How? It would load the HTML just as often and not download it a second time as that would invalidate the usage

I'm guessing you didn't read the linked article? It preloads after 65ms on hover, at which point it estimates a 50% chance that the user will click. Hence "loaded twice as much".
> True for users who hover over links they decide not to visit
Yes, that's the point.

ThomPete1 reply#
Is this kind of like turbolinks which Basecamp uses?
glacials2 replies#
Similar in effect, but not in method. Turbolinks fetches pages after a click like normal, but swaps the body tag from the new page into the current page, cutting local render times.
ThomPete#
Interesting. So this could be used internally in a web app i guess.
Savageman1 reply#
Would it make sense to combine them? Instant turbo links.
sfusato#
Yes, it would make lots of sense. If Turbolinks adds a 'prefetch' mechanism, it will get even faster.

Load more comments