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.
What would be a good way to avoid prefetch requests in your analytics if you only derive analytics from server access logs?