News for hackers. Stuff that matters.
Re:Show HN: Make your site’s pages instant in one minute by hombre_fatal on Saturday February 09, 2019 @12:41PM (#19123524)
Good point.

What would be a good way to avoid prefetch requests in your analytics if you only derive analytics from server access logs?

Re:Show HN: Make your site’s pages instant in one minute by 8bitben on Saturday February 09, 2019 @01:01PM (#19123628)
Most browsers pass a "purpose:prefetch" or similar HTTP header in the prefetch request that you can use to differentiate
Re:Show HN: Make your site’s pages instant in one minute by hueving on Saturday February 09, 2019 @11:48PM (#19126409)
Then how do you know when they actually go to the page? Do you need client side analytics at that point since the browser already has the page in memory?
Re:Show HN: Make your site’s pages instant in one minute by Drakim on Saturday February 09, 2019 @01:06PM (#19123657)
You could obviously do it with JavaScript by pinging the server to tell him that log entry X is to be promoted to a true "hit".

For a non-JS solution, I guess an tiny iframe at the bottom of the html page that accesses a special server page with an unique stamp that causes the same "hit". the iframe loading would mean that the rest of the page is mostly loaded before it was closed.

Re:Show HN: Make your site’s pages instant in one minute by jsjohnst on Saturday February 09, 2019 @08:47PM (#19125916)
> For a non-JS solution

How do you use this library with JS disabled?

Re:Show HN: Make your site’s pages instant in one minute by Drakim on Sunday February 10, 2019 @04:14AM (#19127015)
The iframe would have to be part of the HTML document from the very start. Maybe a server-side pre-processor that appends it as it's served.