News for hackers. Stuff that matters.
Re:Progressive Enhancement Is Dead by Pinckney on Monday September 02, 2013 @03:26PM (#6316662)
I think the point that's overlooked here is that the offenders aren't the clever apps that would be impossible to write without javascript. Go ahead and write those. I'm happy for you, really.

The problem is pages that require javascript to display static content. There are very few good reasons for an article, or an image gallery, or a homepage that could have been displayed just fine a decade ago to now need javascript so it can do some stupid flashy thing that breaks the expected interface behaviour. And frankly, that's most of what I'm seeing in "Sigh, Javascript."

Re:Progressive Enhancement Is Dead by mmastrac on Monday September 02, 2013 @03:32PM (#6316706)
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.

Re:Progressive Enhancement Is Dead by dredmorbius on Monday September 02, 2013 @07:10PM (#6317728)
Search-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.

Re:Progressive Enhancement Is Dead by radq on Tuesday September 03, 2013 @03:15AM (#6319497)
> 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-en...

Re:Progressive Enhancement Is Dead by dredmorbius on Tuesday September 03, 2013 @07:07PM (#6324482)
"Not too difficult" and "is actually done by your typical technically naive person" is a few worlds apart.
Re:Progressive Enhancement Is Dead by andrenotgiant on Monday September 02, 2013 @03:35PM (#6316721)
Javascript-dependent content _can_ present problems for search engine accessibility
Re:Progressive Enhancement Is Dead by mmastrac on Monday September 02, 2013 @03:44PM (#6316772)
There have been techniques for dealing with this for a very long time: 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.

Re:Progressive Enhancement Is Dead by pornel on Monday September 02, 2013 @04:06PM (#6316882)
Sigh, 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.

Re:Progressive Enhancement Is Dead by chaddeshon on Monday September 02, 2013 @06:36PM (#6317585)
_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. 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.

Re:Progressive Enhancement Is Dead by ylesaout on Monday September 02, 2013 @04:47PM (#6317114)
Not 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), I built this application (http://www.appscharts.me) illustrating this purpose.

Re:Progressive Enhancement Is Dead by huhtenberg on Monday September 02, 2013 @04:19PM (#6316961)
Google has been crawling AJAX'd websites bypassing the _escaped_fragment_ mechanism for at least a year now.
Re:Progressive Enhancement Is Dead by chaddeshon on Monday September 02, 2013 @06:30PM (#6317547)
Has 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.

Re:Progressive Enhancement Is Dead by huhtenberg on Tuesday September 03, 2013 @02:21AM (#6319324)
Re:Progressive Enhancement Is Dead by chaddeshon on Tuesday September 03, 2013 @11:18AM (#6321420)
Certainly 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.

Re:Progressive Enhancement Is Dead by slig on Monday September 02, 2013 @04:18PM (#6316955)
It's not like other search engines can't step up their game and build the same functionality.
Re:Progressive Enhancement Is Dead by repsilat on Monday September 02, 2013 @06:41PM (#6317611)
The 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.

Re:Progressive Enhancement Is Dead by ylesaout on Monday September 02, 2013 @07:07PM (#6317718)
Maybe 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 ;)
Re:Progressive Enhancement Is Dead by mwsherman on Monday September 02, 2013 @04:35PM (#6317055)
I 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.

Re:Progressive Enhancement Is Dead by kintamanimatt on Monday September 02, 2013 @05:18PM (#6317238)
From 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

Re:Progressive Enhancement Is Dead by jasonlotito on Monday September 02, 2013 @06:45PM (#6317631)
Not 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/...

Amongst many other links.

Re:Progressive Enhancement Is Dead by oneeyedpigeon on Monday September 02, 2013 @06:59PM (#6317693)
"99.99% of the people visiting my site have JS enabled"

Do you know that for a FACT, or are you just guessing?

Re:Progressive Enhancement Is Dead by marcosdumay on Monday September 02, 2013 @10:50PM (#6318456)
His javascript based analytics software has all the numbers.
Re:Progressive Enhancement Is Dead by TheLoneWolfling on Monday September 02, 2013 @07:54PM (#6317885)
To add to this, generally most user data collected is through javascript.

If you don't have javascript enabled...

Re:Progressive Enhancement Is Dead by oneeyedpigeon on Tuesday September 03, 2013 @08:05AM (#6320394)
Yup, 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% :)
Re:Progressive Enhancement Is Dead by dreamfactory on Monday September 02, 2013 @08:01PM (#6317913)
...because if it's say 98%, you have just thrown away 2% revenue.
Re:Progressive Enhancement Is Dead by gnaritas on Monday September 02, 2013 @09:55PM (#6318284)
Hardly, 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.
Re:Progressive Enhancement Is Dead by dreamfactory on Monday September 02, 2013 @11:45PM (#6318719)
Another 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.
Re:Progressive Enhancement Is Dead by gnaritas on Tuesday September 03, 2013 @02:14AM (#6319300)
That's the opposite way of putting it. The way of extra work to support edge case users that often aren't worth the effort. Now maybe it's worth it for a big enough site, but for the average site I doubt it ever is. I think it perfectly reasonable to ignore users who disable JavaScript for most websites.
Re:Progressive Enhancement Is Dead by dreamfactory on Tuesday September 03, 2013 @11:06AM (#6321363)
So do I tbh but nobody ever makes a proper business case in practise. If you are going to say that HTML is no longer the default protocol for serving content to browsers (and that it is therefore extra work to support rather than the other way round), it seems like quite a big step. I guess we can rationalise the tattered corpses of Java widgets, Flash, ActiveX, Silverlight by saying they had proprietary roots and no universal support but feels like there's a lot of handwavey stuff around client support, RESTfulness, SEO.
Re:Progressive Enhancement Is Dead by gnaritas on Tuesday September 03, 2013 @11:43AM (#6321567)
Of course HTML is the default protocol, but not vanilla HTML; many sites require JavaScript as well; the default is HTML + JavaScript not just HTML. Supporting non js enhanced HTML is extra work.
Re:Progressive Enhancement Is Dead by asdasf on Tuesday September 03, 2013 @01:26PM (#6322284)
It isn't extra work or an edge case. It is doing the baseline correct thing. I can't count the number of fad obsessed "web developers" who ask us why we serve html instead of javascript crap, while they take 3 times as long to produce a broken version of the same thing.
Re:Progressive Enhancement Is Dead by gnaritas on Tuesday September 03, 2013 @01:33PM (#6322330)
> It is doing the baseline correct thing.

You don't get to define what the baseline correct thing is for a business, profit does that. Progressive enhancement is more work than simply presuming JavaScript is always available; that's just a simple undeniable fact.

Re:Progressive Enhancement Is Dead by asdasf on Tuesday September 03, 2013 @01:48PM (#6322440)
>You don't get to define what the baseline correct thing is for a business, profit does that

That's what I am using.

>Progressive enhancement is more work than simply presuming JavaScript is always available; that's just a simple undeniable fact.

I am denying it right now, that is the whole point. Server side templates with simple javascript enhancement has been much faster for us, and much easier to maintain.

Re:Progressive Enhancement Is Dead by gnaritas on Wednesday September 04, 2013 @01:21PM (#6328986)
> I am denying it right now, that is the whole point. Server side templates with simple javascript enhancement has been much faster for us, and much easier to maintain.

I simply don't believe you. It's a fact that it's more work to support both AJAX interactions and work with js disabled than it is to support just AJAX alone. There is no arguing this, it's more work to support 2 modes of interaction than it is to support only 1. You may find it a comfortable workflow for you, to start with vanilla HTML and then progressively enhance it, but regardless of how much you like the style, it is more effort and does have more long term maintenance costs to forever support 2 modes of interaction. No one who isn't completely full of shit would argue that progressive enhancement is less work.

Re:Progressive Enhancement Is Dead by asdasf on Thursday September 05, 2013 @09:34AM (#6334038)
HN is not the venue for that kind of garbage. Your personal experiences and biases are not universal objective truths. Grow up.
Re:Progressive Enhancement Is Dead by gnaritas on Thursday September 05, 2013 @03:06PM (#6336181)
I require no lecture about HN from you, I've been here since the beginning. I listed facts not personal experiences and I'm sorry you can't handle that and resort to lying.
Re:Progressive Enhancement Is Dead by asdasf on Thursday September 05, 2013 @03:53PM (#6336504)
> It's a fact that it's more work to support both AJAX interactions and work with js disabled than it is to support just AJAX alone

That is not a fact. It may well be your experience from the way your applications were written, but it is not a fact. You clearly do need a lecture, or you wouldn't be posting garbage.

Re:Progressive Enhancement Is Dead by gnaritas on Thursday September 05, 2013 @06:30PM (#6337543)
Whatever child; goodbye.
Re:Progressive Enhancement Is Dead by dllthomas on Tuesday September 03, 2013 @11:27AM (#6321465)
"Hardly, you have to consider the additional cost of attempting to support that additional 2%"

That's certainly not how I calculate revenue...

Re:Progressive Enhancement Is Dead by gnaritas on Tuesday September 03, 2013 @01:29PM (#6322304)
Revenue isn't the right metric; profit is. My point is that chasing revenue isn't what good businesses do, they chase profit. I don't care about 2% additional revenue if doing so reduces profit due to the extra development and maintenance overhead and neither should any sane business person.
Re:Progressive Enhancement Is Dead by dllthomas on Tuesday September 03, 2013 @01:47PM (#6322433)
Obviously. This would have been a solid response to dreamfactory's comment.
Re:Progressive Enhancement Is Dead by drostie on Monday September 02, 2013 @05:51PM (#6317386)
The "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.
Re:Progressive Enhancement Is Dead by strictfp on Tuesday September 03, 2013 @01:00AM (#6319062)
Because most of those solutions have their own half-assed impls of * Loading indicators * Navigation through history * Error display * Scrolling I could go on.
Re:Progressive Enhancement Is Dead by pekk on Monday September 02, 2013 @07:58PM (#6317902)
The top reason to require Javascript is to enable user tracking (e.g. Google Analytics, but not just that at all).
Re:Progressive Enhancement Is Dead by leokun on Monday September 02, 2013 @03:29PM (#6316683)
Check out meteor.js for why JavaScript would be needed for "static only content". Real time updates. That's why. Everything is an app.
Re:Progressive Enhancement Is Dead by anonymousab on Monday September 02, 2013 @03:36PM (#6316729)
Which is silly. If I'm just trying to view a news article from yesterday or a year ago, I shouldn't have to worry about what some silly script is trying to do.

If the core of the content is or should be text, then there's no need for countless silly layers around it.

Re:Progressive Enhancement Is Dead by leokun on Monday September 02, 2013 @03:52PM (#6316812)
Maybe you want a PDF instead.
Re:Progressive Enhancement Is Dead by asdasf on Tuesday September 03, 2013 @01:28PM (#6322299)
Or maybe some sort of "hypertext" document. That could contain links to other such documents, allowing users to easily navigate content. All this interlinked content could form some sort of "web" even.
Re:Progressive Enhancement Is Dead by FooBarWidget on Monday September 02, 2013 @04:00PM (#6316841)
When your only tool is a hammer, everything looks like a nail. There are valid use cases that meteor.js is awesome for, but one should avoid cargo culting.
Re:Progressive Enhancement Is Dead by TelmoMenezes on Monday September 02, 2013 @04:14PM (#6316930)
Maybe I'm getting old but sometimes I really really don't want real time updates.
Re:Progressive Enhancement Is Dead by marknutter on Monday September 02, 2013 @11:37PM (#6318656)
You want to keep hitting refresh, refresh, refresh?
Re:Progressive Enhancement Is Dead by dllthomas on Tuesday September 03, 2013 @11:31AM (#6321495)
He wants the page not to change under him when he hasn't hit refresh. Personally, race conditions between user and UI drive me crazy.
Re:Progressive Enhancement Is Dead by mynameisme on Monday September 02, 2013 @03:33PM (#6316711)
Is this something people even want in content driven sites though? Imagine reddit in real time, it would be a mess and impossible to keep track of what you last read.
Re:Progressive Enhancement Is Dead by kansface on Monday September 02, 2013 @05:24PM (#6317254)
Why should users have to click refresh for pages to load more comments or to see when someone replies to you? The fact that reddit does not do this is not evidence that it would be confusing.
Re:Progressive Enhancement Is Dead by icebraining on Monday September 02, 2013 @06:10PM (#6317465)
Because sites that distract me from what I'm reading to tell me that there are new comments are extremely annoying.

Sure, you could add, say, auto-loading for new comments when you reach the bottom of the page, or setting the message icon to orange when you get a reply, but that hardly requires a full-blown web app, it's a simple addon to a static site.

Re:Progressive Enhancement Is Dead by camus on Monday September 02, 2013 @07:43PM (#6317849)
disqus deals with this issue quite well , disqus will just notify you there are new comments ,it's up to you to load them or not.
Re:Progressive Enhancement Is Dead by sgdesign on Monday September 02, 2013 @06:01PM (#6317425)
You can try out for yourself :)

http://telesc.pe

Re:Progressive Enhancement Is Dead by mynameisme on Monday September 02, 2013 @07:16PM (#6317752)
I have, and it works ok when there is a ton of concurrent users. But on the other hand, I don't think the UX of telescope is any better than reddit's and in some ways worse (example: clicking on a post with a large amount of comments cause the page to pause without any visual feedback. This could be fixed, but is any better than just a regular link?)
Re:Progressive Enhancement Is Dead by Joeboy on Monday September 02, 2013 @03:52PM (#6316809)
So, for static content that changes in real time.
Re:Progressive Enhancement Is Dead by superluminary on Tuesday September 03, 2013 @04:25AM (#6319725)
No reason why you can't provide real time updates on your content driven site. and respect progressive enhancement. I'd submit this would be the easiest way to do it.