Live data from Hacker News

Javascript apps can be fully crawlable

prerender.io

61–70 of 112 posts

Re: Javascript apps can be fully crawlable

#62
post #54
post #45

Earlier quoted context omitted.

... right but a bot doesn't get impatient. So I don't see your point.

They should just shut down all their data centers and crawl the whole web from a single box located in someone's basement. After all, the bot doesn't get impatient.

... Comments have really gone to shit here haven't they.

Some how we all end up antagonistic over bullshit like whether google have a big enough computer.

But alas, you're right, google could never crawl with an actual browser - what a ridiculous suggestion. I apoligise for such a dumb-witted comment.

As an aside: For my part in contributing such bad quality comments, I apoligise.

Re: Javascript apps can be fully crawlable

#63

An entire project written to simulate progressive enhancement (badly). One that only works for specified whitelisted User-Agents, instead of being based on capability. I'm also not understanding the use-case for this project. Everytime the topic of "Web Apps", "JavaScript Apps", "Single page web apps" comes up, evangelists point out that they are applications (or skyscrapers), not just fancy decorators for website co…

+100

Why some developers are so against progressive enhancement mystifies me. It is an elegant solution that actually works in all cases rather than an ugly hack that should probably work in the majority of cases. How can there even be a dispute about it? It's insane!

Re: Javascript apps can be fully crawlable

#66
post #60

If you are able to "pre-render" a JavaScript app like this, then you should be serving users the pre-rendered version and then enhancing it with JavaScript after onload. JavaScript-only apps are a blight on the web. All it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user.

All it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user. How are non-JavaScript pages protected from this?

Less dependencies, a reduced risk vector. Just the HTML page containing the content needs to load.

Re: Javascript apps can be fully crawlable

#68
post #60

If you are able to "pre-render" a JavaScript app like this, then you should be serving users the pre-rendered version and then enhancing it with JavaScript after onload. JavaScript-only apps are a blight on the web. All it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user.

All it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user. How are non-JavaScript pages protected from this?

Apologies for being vague. Regarding the SSL certificate, I was referring to modern browsers refusing to load "unsafe" assets.

When the JS can't load, JS-heavy apps tend to either be raw templates (i.e. full of {{ statements }}) or completely blank (if the templates were going to be loaded in a separate request). As Isofarro said, non-JS pages don't suffer from this because the content is there in plain HTML.

Re: Javascript apps can be fully crawlable

#69

This is a great approach, but detecting the user-agent is the wrong way to decide if you should pre-render the page. If you include the following meta tag in the header: then Google will request the page with the "_escaped_fragment_" query param. That's when you should serve the pre-rendered version of the page. Google has documentation on this here: https://developers.google.com/webmasters/ajax-crawling/docs/... and…

I wrote a similar open source library that uses this approach last year

http://github.com/apiengine/seoserver

and the blog post related to it

http://backbonetutorials.com/seo-for-single-page-apps/

Re: Javascript apps can be fully crawlable

#70

This is a great approach, but detecting the user-agent is the wrong way to decide if you should pre-render the page. If you include the following meta tag in the header: then Google will request the page with the "_escaped_fragment_" query param. That's when you should serve the pre-rendered version of the page. Google has documentation on this here: https://developers.google.com/webmasters/ajax-crawling/docs/... and…

I wrote a similar open source library that uses this approach last year http://github.com/apiengine/seoserver and the blog post related to it http://backbonetutorials.com/seo-for-single-page-apps/

[deleted]
Post reply on HN