Earlier quoted context omitted.
It actually cancels the previous request when you hover over another link
Client side canceled doesn’t necessarily translate to server side canceled. I used to use a preload-on-hover trick like this but decided to remove it once we started getting a lot of traffic. I was afraid I’d overload the server.
Show HN: Make your site’s pages instant in one minute
291–300 of 361 posts
Re: Show HN: Make your site’s pages instant in one minute
#292Live demo on my website @ https://sysadmincasts.com/ Temporary added it in-line for testing. I was already in the sub 100ms level but this just puts it over the top! Also updated all admin add/edit/delete/toggle/logout links with "data-no-instant". Pretty easy. Open developer preview and watch the network tab. Pretty neat to watch it prefetch! Thanks for creating this! ps. Working on adding the license comment. I str…
I'd expect this preload script to remember the pages it's already fetched and not duplicate work unnecessarily. :/
Re: Show HN: Make your site’s pages instant in one minute
#293Many people browse the web from an employer who has rules about what types of pages may be accessed. For example, a person applying for a job with my team may include a link to a web page about their job-related background -- portfolio.html or whatever. HR tells us to be sure we don't follow links to any other page that may be more personal in nature, such as a page that reveals the applicant's marital status (which…
Does your company tell its' employees about their Orwellian policies upfront when hiring, or is it a public secret?
How do you deal with encrypted traffic, e.g. https?
Some companies simply filter web traffic via corporate white/blacklists, maybe you have some insights why an illusion of freedom has been chosen in your company?
Re: Show HN: Make your site’s pages instant in one minute
#294Earlier quoted context omitted.
POSTs are not Links. And Logout service is indempotent even if you can consider it changes the state of the system
Lots of people in this thread confusing “idempotent” with “safe” as specified in the HTTP RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
Re: Show HN: Make your site’s pages instant in one minute
#295Earlier quoted context omitted.
The part about viewing family.html seems kind of understandable. If you assume no bad actors, then it's crazy... But we're all developers here, we know that you have to assume the existence of bad actors, and assume that they are going to target you (which is why we you always validate data client data server-side). I could see how viewing family.html could turn into a real headache for HR/Legal, especially if the la…
We're talking about evidence in a discrimination court case that points to an IP address associated with a company that visited /family.htm around the time someone applied for a job they didn't get. Like, that person went through their blog's access.log when they got home, defeatedly looking up IP addresses, and going "aha, jackpot!"? And everyone in the company hovers links to be sure they don't go to /as-a-black-ma…
Re: Show HN: Make your site’s pages instant in one minute
#296Live demo on my website @ https://sysadmincasts.com/ Temporary added it in-line for testing. I was already in the sub 100ms level but this just puts it over the top! Also updated all admin add/edit/delete/toggle/logout links with "data-no-instant". Pretty easy. Open developer preview and watch the network tab. Pretty neat to watch it prefetch! Thanks for creating this! ps. Working on adding the license comment. I str…
Embedding base64 images isn't really more efficient on HTTP/2 servers. Base64 adds overhead, and multiplexing mitigates the cost of additional network requests.
Re: Show HN: Make your site’s pages instant in one minute
#297Each time you hover over a link it's doing a GET request bypassing the cache (cache-control: max-age), even if you hove the same multiple times. Also this will make all your analytics false... Except that indeed this can improve greatly the user sensation of speed
What's more important - analytics, or the user experience. Damaging stats sucks, but this seems to outweigh that.
Re: Show HN: Make your site’s pages instant in one minute
#298
if (screen.width > 768) {
let script = document.createElement('script');
script.src = '//instant.page/1.0.0';
script.type = 'module';
script.integrity = 'sha384-6w2SekMzCkuMQ9sEbq0cLviD/yR2HfA/+ekmKiBnFlsoSvb/VmQFSi/umVShadQI';
document.write(script.outerHTML);
}
Re: Show HN: Make your site’s pages instant in one minute
#299If 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: if (screen.width > 768) { let script = document.createElement('script'); script.src = '//instant.page/1.0.0'; script.type = 'module'; script.integrity = 'sha384-6w2SekMzCkuMQ9sEbq0cLviD/yR2…
> On mobile, a user starts touching their display before releasing it, leaving on average 90 ms to preload the page.
Re: Show HN: Make your site’s pages instant in one minute
#300Earlier quoted context omitted.
The analytics should only be triggered is the page is rendered, assuming it's done client side. I believe Google does this for first top 3 results if I'm not mistaken.
Added bonus: these extra pre-loads on hover will tell you if someone nearly clicked a link. Your web server logs contain some poor-man's eye tracking. Could aid determining if important parts of your pages (warning messages and so forth) gather enough attention.