h5bp / html5please

Graded Feature Support: Look up web technologies and find out if they are ready for use.
http://html5please.com/
MIT License
837 stars 265 forks source link

link rel prefetch #225

Open Raynos opened 11 years ago

Raynos commented 11 years ago

Its surprisingly hard to congruent information about it. Half of it is saying "its cool use it" and the other half says "how to break your web pages. use prefetch"

nimbupani commented 11 years ago

HTML5 Boilerplate talks about prefetch a bit in the docs

Raynos commented 11 years ago

Thats just DNS prefetching and not link prefetching

nimbupani commented 11 years ago

oops sorry. I thought it also talked about link prefetching too.

passcod commented 11 years ago

I wrote a StackOverflow answer for this a while back… and it's pretty comprehensive. tl;dr:

I would recommend to avoid it, as it is too fragmented and isn't used enough / doesn't seem to offer much advantages (browsers already do optimisation automatically anyway). OTOH, using rel="prefetch" wouldn't do anything bad per se.

igrigorik commented 11 years ago

@passcod's answer is basically there. A few small corrections:

There is no reason to avoid it. It's a browser hint, and it's not going to harm you: if the browser recognizes it, it may use it, if it doesn't, then no harm done.

Details on Chrome implementation:

nimbupani commented 11 years ago

@Raynos can you combine @passcod & @igrigorik comments to write a post on link rel prefetch?

igrigorik commented 11 years ago

@nimbupani @Raynos fwiw, http://chimera.labs.oreilly.com/books/1230000000545/ch10.html#_browser_optimization

cvrebert commented 9 years ago

IE has improved its support: http://blogs.msdn.com/b/ie/archive/2013/12/04/getting-to-the-content-you-want-faster-in-ie11.aspx

cvrebert commented 8 years ago

http://caniuse.com/#feat=link-rel-prefetch

passcod commented 8 years ago

I updated my SO answer today: http://stackoverflow.com/questions/7830675/how-can-i-preload-a-page-using-html5/7830732#7830732

TL;DR: Prefetch has very good support, DNS Prefetch has near-universal support, the other three (preconnect, prerender, lazyload) have varying levels of support. I'd recommend "use it" for prefetch and dns, "use it but be aware browser support isn't fully there yet" for preconnect and prerender, and probably "don't use" or at least "don't rely on it" for lazyload (it's a Microsoft extension).