However, I find it very good the posted snippets include SRI, which sadly to this day almost every script CDN omits. The code is also small enough to just include it in projects, which avoids the external request entirely.
Show HN: Make your site’s pages instant in one minute
211–220 of 361 posts
Re: Show HN: Make your site’s pages instant in one minute
#212Re: Show HN: Make your site’s pages instant in one minute
#213Wow this looks really great. Just tried it on my website[0], and page loads are pretty much instantaneous. However, it doesn't seem to work in Firefox 67 (Nightly). Does that mean it only works in Chrome? [0]: https://freshman.tech
Re: Show HN: Make your site’s pages instant in one minute
#214It seems everybody is missing this but this could actually slow down your experience, and I'd actually guess it will in some scenarios (ie. not only a theoretical situation). Considering a user hovering over a bunch of links and then clicking the last one, and doing this in a second. Let's assume your site takes 3 sec to load (full round-trip) and you're server is only handling one request at a time (I'm not sure how…
It actually cancels the previous request when you hover over another link
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.
Re: Show HN: Make your site’s pages instant in one minute
#215Re: Show HN: Make your site’s pages instant in one minute
#216Earlier quoted context omitted.
Is there something similar available on Django?
This should be completely backend agnostic. I was never a Django person, but you’d just put that script tag in your main template so it loads on every page.
Re: Show HN: Make your site’s pages instant in one minute
#217Wow this looks really great. Just tried it on my website[0], and page loads are pretty much instantaneous. However, it doesn't seem to work in Firefox 67 (Nightly). Does that mean it only works in Chrome? [0]: https://freshman.tech
Firefox has a bug that makes it redownload the page if that page is not cached.
Re: Show HN: Make your site’s pages instant in one minute
#218Is this a re-rebranding? I remember using something similar 4-5 years ago (instant.js/instantclick). But quite an interesting little thing, especially useful for older websites to bring some life into them. The effect is very noticeable.
I've seen this kind of features several times on libs. And sometimes I can't un-think about it while my mouse is hovering on links in normal life. It's .. prefetching or not?
If you send a requested page, that's obviously fine. Normal use of websites is expected, but unilaterally instructing your site visitor's browser to download further unrequested content that's not part of a requested resource ...?
Re: Show HN: Make your site’s pages instant in one minute
#219Earlier quoted context omitted.
> I feel this fails a user expectation that simply hovering over a link doesn't inform the server of anything. I would bet 99%+ of web users do not have a sufficiently detailed mental model of web pages that this is something they've decided one way or the other.
Agreed, my expectations are the opposite. Google Analytics et al, allow custom events which are used to record mouse overs, clicks, et cetera on a majority of websites. I always just assume everything I do, down to page scrolls and mouse movements, is recorded.
Re: Show HN: Make your site’s pages instant in one minute
#220Not sure how I feel about this. I often hover over a link to see where it is linking to, see if it has a title, etc. But that's probably not typical of most users. And I don't do it on sites I use often and am familiar with.
There's usually no penalty, though. You hover, and the page preload begins. Unless you're trying to keep your data usage to a minimum, there's no disadvantage to you.
I can see children getting punkd by drive-by prefetch and reporting to teaching staff that X visited a neo-nazi site or, Y downloaded porn during class, etc..
"Prefetch did it" is probably not going to be apparent to most, and is going to sound like a weaksauce excuse.