News for hackers. Stuff that matters.
Re:Show HN: JS library to make your website instant by VeejayRampay on Saturday February 08, 2014 @10:57AM (#7201471)
Another idea: take into account the movement of the mouse to define a directional cone in the general direction of the movement, which would enable you to preload your pages even before the hover state occurs.
Re:Show HN: JS library to make your website instant by devgutt on Saturday February 08, 2014 @01:51PM (#7202101)
Amazon have done this to improve the performance of dropdown menu. http://bjk5.com/post/44698559168/breaking-down-amazons-mega-...
Re:Show HN: JS library to make your website instant by yelnatz on Saturday February 08, 2014 @03:58PM (#7202695)
This article was really eye opening when I read it a few months ago.

I've always hated menu dropdowns where it would close if you try to skip to the next submenu you've opened, since you hovered on the other parts on your way to the submenu.

So you'd end up having to perfectly 'trace' the menu so it won't close down on you.

Re:Show HN: JS library to make your website instant by joshuahhh on Saturday February 08, 2014 @05:50PM (#7203198)
That article says nothing about preloading pages. The speed gains are purely a UI thing -- if you're clever about keeping submenus open even when the mouse leaves the submenu's entry in the main menu, you don't need to provide a delay for menu opening/closing.
Re:Show HN: JS library to make your website instant by dmethvin on Sunday February 09, 2014 @10:45AM (#7205827)
I think the Amazon example was being used as an example of the "directional cone", not preloading.
Re:Show HN: JS library to make your website instant by mcpherrinm on Sunday February 09, 2014 @05:15AM (#7205056)
A few years ago, I went to a tech demo/hackathon thing. Somebody had some neat experiments with preloading pages speculatively based on user behaviour

The coolest approach given was when a user types in the search box, kick off the request for the full results page if they move their mouse on a motion curve towards one of the results, with some machine learned data on how people move their mouse: Not quite in a straight line, and with some acceleration.

Re:Show HN: JS library to make your website instant by dieulot on Saturday February 08, 2014 @11:02AM (#7201485)
Kinda overkill. ;) I may explore this idea later, but I don’t have great hope for it.
Re:Show HN: JS library to make your website instant by VeejayRampay on Saturday February 08, 2014 @12:55PM (#7201893)
It is overkill, you're absolutely right about that. But that's the good thing about the webs, you can throw the stupidest ideas on the table and the let everyone flesh it out :D
Re:Show HN: JS library to make your website instant by ivanca on Saturday February 08, 2014 @12:23PM (#7201779)
Most times there are some few links that are very frequently clicked on; for example in Hacker News is usually the "next page" and the "threads". So if there is not one already there should be a way to specify some (obligatory?) preload pages.
Re:Show HN: JS library to make your website instant by CoryG89 on Saturday February 08, 2014 @02:14PM (#7202174)
I think you should utilize the prefetch behavior of the link tag for situations such as these. No need for JavaScript at all.
Re:Show HN: JS library to make your website instant by k__ on Saturday February 08, 2014 @02:40PM (#7202285)
Could you elaborate this, please.
Re:Show HN: JS library to make your website instant by ivanca on Saturday February 08, 2014 @03:23PM (#7202518)

    <link rel="prefetch" href="http://example.com/page2" />
More info at http://davidwalsh.name/html5-prefetch
Re:Show HN: JS library to make your website instant by dieulot on Saturday February 08, 2014 @12:32PM (#7201805)
In my opinion even that is overkill. Remember, in most cases it’s already instant. The return on investment (speed/requests) abruptly declines with brute preloading.
Re:Show HN: JS library to make your website instant by agumonkey on Saturday February 08, 2014 @11:04AM (#7201495)
Weird I thought about this last night and wondered if browser pruned the dom/layers based on input device deltas.
Re:Show HN: JS library to make your website instant by zarex on Saturday February 08, 2014 @02:03PM (#7202142)
I believe I read somewhere that Amazon does this for their menus. Clever idea to utilize this kind of analysis though.

edit: @devgutt else already mentioned this. I had this page open for a while before posting.

Re:Show HN: JS library to make your website instant by Vektorweg on Saturday February 08, 2014 @11:12AM (#7201533)
Or just load every page. ;)
Re:Show HN: JS library to make your website instant by yogo on Saturday February 08, 2014 @11:18AM (#7201555)
That might not be very nice for some mobile users that are on a site with a ton of links (like a news site) :)
Re:Show HN: JS library to make your website instant by hakcermani on Saturday February 08, 2014 @11:33AM (#7201604)
There is no hover for mobile. Maybe track eye focus in future :-)
Re:Show HN: JS library to make your website instant by yogo on Saturday February 08, 2014 @12:26PM (#7201790)
It's a continuation of a joke with the parent comment regarding loading every page. It would be the brute force version of InstantClick :)
Re:Show HN: JS library to make your website instant by dhoulb on Saturday February 08, 2014 @01:09PM (#7201943)
Not a bad shout. Not EVERY page, but if you have a five page site, you might as well pull in all five at the time, and save the other four requests later.

The actual HTML is only going to add another few KB.

Re:Show HN: JS library to make your website instant by dclara on Saturday February 08, 2014 @02:18PM (#7202192)
I'm sorry that I don't feel it very efficient, because sites with dynamic contents like HK or eCommerce/financial sites, very page is different from minute to minute.

But caching the skeleton of the page will work. We need browser to do it for us, just like browsers already caches the images.

Re:Show HN: JS library to make your website instant by baddox on Saturday February 08, 2014 @01:42PM (#7202063)
Or the pages that are most likely to be requested, based on previous session data which you have stored and analyzed.
Re:Show HN: JS library to make your website instant by fiatjaf on Sunday February 09, 2014 @05:17PM (#7207594)
Another idea: preload all links of every page.