7 ms·
What, exactly, is the issue with writing a simple content site that requires JS? If you aren't pulling in half a MB of JS, but it does require scripting to func
by mmastrac 13y ago
What, exactly, is the issue with writing a simple content site that requires JS? If you aren't pulling in half a MB of JS, but it does require scripting to function, I don't see the problem. Just because I could spend the effort to be progressive doesn't constrain me to have to do it. It doesn't make me a lazy programmer either: just pragmatic.
99.99% of the people visiting my site have JS enabled and I'm happy to support them just fine without worrying about the really long tail.
- andrenotgiant 13y agoJavascript-dependent content _can_ present problems for search engine accessibility
- mmastrac 13y agoThere have been techniques for dealing with this for a very long time: https://developers.google.com/webmasters/ajax-crawling/docs/html-snapshot https://developers.google.com/webmasters/ajax-crawling/docs/... And this is only an issue for pages where you actually want to expose your content to search engines.
- deleted 13y ago[deleted]
- pornel 13y agoSigh, Google-only websites. _escaped_fragment_ is a stupid hack that requires hardest bit of work needed for progressive enhancement, but provides none of the benefit.
- slig 13y agoIt's not like other search engines can't step up their game and build the same functionality.
- repsilat 13y agoThe problem is that now everyone who wants to build a decent crawler/scraper has to do it as well. Used to be any kid in his parents' basement could put wget and sed together and explore the internet. Now Timmy has to bolt a whole damn browser runtime onto his script to make sure he's getting the content text from blog posts and twitter feeds. Asking Timmy to "step up his game" is heartless, and it'd be unnecessary if we were better citizens.
- ylesaout 13y agoMaybe Timmy should just have a look at the Google specification! And he would see that he could continue to crawl the web with his favorite tool! He has just to replace #! with an _escaped_fragment_ query parameter, that's not so heartless ;)
- huhtenberg 13y agoGoogle has been crawling AJAX'd websites bypassing the _escaped_fragment_ mechanism for at least a year now.
- chaddeshon 13y agoHas it really? Do you have an example? I've never seen an example where Google crawled a page and included content that was loaded via ajax or an external javascript file. I have seen Google index content that is loaded from a script tag included in the html page.
- huhtenberg 13y agohttps://news.ycombinator.com/item?id=3985981 https://news.ycombinator.com/item?id=3985981
- chaddeshon 13y agoCertainly cool that Google is working on this. I suspect someday it will all work perfectly. However, from working with customers of BromBone, I know this. People have javascript powered webpages that were not getting indexed by Google. Google would crawl the page, and see no content. The pages were not in Google. After creating prerendered snapshots and serving them when the _escaped_fragment_ parameter was present, the pages showed up in Google.
- ylesaout 13y agoNot only Google! Bing (and so Yahoo), Yandex and Facebook (only #! for this last) support this protocol too. And if you use html5 pushstate you could even serve the HTML captures to any bots. Eventually you also could easily add graceful degradation to your site serving snapshots for non js users. As of PoC for SEO4Ajax (http://www.seo4ajax.com http://www.seo4ajax.com), I built this application (http://www.appscharts.me http://www.appscharts.me) illustrating this purpose.
- chaddeshon 13y ago_escaped_fragment_ is a bit of a hack, but it also provide enormous benefit. It allows you to gain all the benefits this article is talking about (which I won't repeat here) and still make you site crawlable without duplicating code. You are right about one thing, it is a pain to setup. Much harder than it sounds at first. After doing it a few times, I finally got sick of it and built http://www.BromBone.com http://www.BromBone.com. It's a service that takes generates the html snapshots for site owners and keeps them up to date. I hope it will let site owner keep all the positives and eliminate most of the new negatives.
- mwsherman 13y agoI have to assume, in Google’s case anyway, that they are indexing according to ‘what the user sees’. Not to do so would means lower-quality search results. Users don’t care how the page ‘happens’. I make this assumption because most of us don’t actually know how Google works, acting as a user’s proxy is in Google’s interest, and it is certainly within their technological capability. (Let me emphasize assume, again.) This would require that the crawler actually renders sites, indexes the resulting DOM, and clicks what can be clicked. A headless Chrome, perhaps.
- kintamanimatt 13y agoFrom Google's technical guidlines: "Use a text browser such as Lynx to examine your site, because most search engine spiders see your site much as Lynx would. If fancy features such as JavaScript, cookies, session IDs, frames, DHTML, or Flash keep you from seeing all of your site in a text browser, then search engine spiders may have trouble crawling your site." https://support.google.com/webmasters/answer/35769?hl=en https://support.google.com/webmasters/answer/35769?hl=en
- jasonlotito 13y agoNot sure what you are trying to say by merely copying and pasting text about random search engine spiders that may have trouble crawling you. Maybe you could explain? With regard to Google, however, they are explicit in their support for JavaScript rendered sites: https://developers.google.com/webmasters/ajax-crawling/docs/html-snapshot https://developers.google.com/webmasters/ajax-crawling/docs/... Amongst many other links.
- drostie 13y agoThe "issue" is that you can just put the simple content in a noscript tag and then your simple content site does not require JS. The content cannot be simple if JS is required.
- oneeyedpigeon 13y ago"99.99% of the people visiting my site have JS enabled" Do you know that for a FACT, or are you just guessing?
- TheLoneWolfling 13y agoTo add to this, generally most user data collected is through javascript. If you don't have javascript enabled...
- oneeyedpigeon 13y agoYup, that's always in the back of my mind when people talk about javascript-enabled user stats. Of course, it's perfectly possible that the OP IS recording accurate(-ish) JS usage stats, it's just more involved than other client stats that are readily provided to the server, so less likely. If 99.99% wasn't just a figure plucked out of the air, it sounds believable that it's being obtained 'correctly', since it's not 100% :)
- dreamfactory 13y ago...because if it's say 98%, you have just thrown away 2% revenue.
- gnaritas 13y agoHardly, you have to consider the additional cost of attempting to support that additional 2%; it could very well cost more than it's worth in development time and long term complexity. Of course that's an app specific decision. Every market you specialize for has a cost, short term and long term, so it has to be worth it financially; businesses aren't in the habit of just being nice for no reason.
- dreamfactory 13y agoAnother way to put it is that vanilla HTML will support the full market so you have to be confident that moving away from it will cover that margin in revenue or savings just to break even. On a large commerce site for example, even a small percentage of revenue could be a staggering amount.
- dredmorbius 13y agoSearch-engine optimization is a large part. The fact that the JS frequently results in lower usability is biggest on my list. I've encountered Blogger themes which are so fucking piss-poor I literally cannot read them, even with JS enabled. If the primary goal of your site is content, stick with vanilla HTML. You're vastly better off for it.
- radq 13y ago> Search-engine optimization is a large part. It doesn't look like it is too difficult to add search indexing support. http://eviltrout.com/2013/06/19/adding-support-for-search-engines-to-your-javascript-applications.html http://eviltrout.com/2013/06/19/adding-support-for-search-en...
- dredmorbius 13y ago"Not too difficult" and "is actually done by your typical technically naive person" is a few worlds apart.
- strictfp 13y agoBecause most of those solutions have their own half-assed impls of * Loading indicators * Navigation through history * Error display * Scrolling I could go on.