This pretty much breaks progressive enhancement. If anything, the user's time zone should be first estimated from their IP address with a setting to override it. The client side solution to further refine it should be piled on top of this last, if possible. JavaScript is useful, but nobody should assume it's present.
Also, it should be noted which time zone a time is in. A naked date/time is about as useful as saying that you're 3 units away from me. What unit does "unit" represent? shrug
By your logic I'd be running a WAP site over Gopher to satisfy the progressive enhancement ethos. At a certain point it's absurd to assume javascript isn't there. [1]
What brought on this particular use case was a JSON response where all the times were in UTC. I'm not really into forcing a technique on someone when it isn't required. If that's not your use case, then you don't have the problem!
No, that's patently absurd, although I have been known to use w3m while doing work in vim, and I'm super grateful when a site is usable from a text only browser. Screen readers and bots (including search engine spiders) have an easier time with well written HTML.
Progressive enhancement is far better for the end user and not all that hard to implement. Some people choose to disable JavaScript, and there are compelling reasons to do this especially if, for example, you're using TBB and want to minimize your attack surface, as has been demonstrated recently.
JavaScript isn't evil by any means, and it's really important for creating cool shit, but it should never be required. If I can't use your site with scripts disabled, neither can a lot of other people. Sucks to be them though, right?
What a ridiculous statement. Lots of things are "required" if you want certain products to be useful. An XBox is required if I want to play XBox games.
Hell you require a web browser just to be able to enjoy the pleasure of checking that "disable javascript" box (though be careful you don't use Mozilla) in the first place (I mean you could use CURL but then you don't actually get to disable javascript).
The point is lets stop kidding around about Javascript here, no-javascript guy.
> If I can't use your site with scripts disabled, neither can a lot of other people.
People who need to disable Javascript are a vanishingly small portion of any potential market, there are many more use cases as far as web apps go where javascript is essential to any decent user experience. Not everything built on web technology is only about content these days. If you don't want to use that technology be my guest, but don't pretend your an important market to people developing on that technology.
> Screen readers and bots (including search engine spiders) have an easier time with well written HTML.
True but two things.
1) Web applications rarely rely on SEO outside of landing pages and a content strategy neither of which should rely on javascript for obvious reasons.
2) Designing applications for disabilities is extremely hard. Much harder than simply using "well written" HTML. Do you know how hard it is for blind people to play most video games? Again we're talking about interactive applications, not simply content. With content there is no problems but as we already went over the web is not only content now.
Edit: One more thought, technically translating the time to the local timezone setting of the browser is "progressively" enhanced. You could always just display UTC time if JS is disabled assuming that was important enough to your users to disable JS (or for bots).
People who need to disable Javascript are a vanishingly small portion of any potential market.
Depends on who your target demographic is. I'm a "no-javascript guy" and my cousin is as too (well, "gal") for completely different reasons. She's on a rubbish computer not living in the U.S. (read: developing country) so often it's just faster and smoother to browse on a wireless connection with JS disabled. You'd be surprised at how common this is.
I frequently disable it while browsing casually and, for about a month or so, it was policy at work until we sorted out a few in-house security issues (namely browsing etiquette for some of the folks). Our CMS was broken during this time and the front UI was quickly re-written in plain HTML. After that, we sorta left it that way.
1) Web applications...
The original post makes no mention of "application" or "web site" for that matter.
Actually, I would. I would be completely surprised if it is common (by that I mean at least more than IE6 usage) at all. However, you've presented no evidence of this fact only anecdote. Seriously there is absolutely no evidence that there is a growing popularity of no-js people out there. Perhaps for very specific demographics, in which case I certainly hope whoever is building product for them knows their customer well enough to know that or God help them.
Either way they are not going to be building the latest in interactive experiences or web-based gaming for your cousin with her rubbish computer are they. That doesn't discount the fact that many people are building exactly that these days.
I'm tired of people on Hacker News making blanket arguments like "never do this" especially something as bland as requiring javascript. They have absolutely no clue what they are talking about.
Bottom line is if I (and Google and 37 signals and countless others) can choose to build something that doesn't support even IE8 I can quite happily choose to require Javascript to use my web application. I would be an idiot however if I required it for my blog.
FYI: Screen readers nowadays can run JS, but there are hiccups abound. Also
I don't recall seeing "never do this", though I did see this: "JavaScript isn't evil by any means, and it's really important for creating cool shit, but it should never be required" from https://news.ycombinator.com/item?id=6176036 . Which, in context of the article, seems pretty reasonable to me.
This all started with when kintamanimatt mentioned that the article's technique breaks Progressive Enhancement, "JavaScript is useful, but nobody should assume it's present."
Obviously, I'll need to get an Xbox to play an Xbox game. I'll need Flash enabled on the browser to play a game built on that. Same goes for JS. But, again, the OP makes no mention of "applications" or "web sites" so I'm not sure why you're bringing up "the latest interactive experiences or web-based gaming" into this.
Honestly this is getting completely absurd so I'll try to be brief
1. You're article actually states how small this is so point taken I guess
2. 99% of screen readers today actually support javascript [1] and as I stated, if you want to talk hiccups effectively supporting the visually impaired is a veritable minefield of challenges and just supporting javascript being disabled isn't even the tip of the iceberg.
3. Finally just this: Also I don't recall seeing "never do this", though I did see this: "JavaScript isn't evil by any means, and it's really important for creating cool shit, but it should never be required". Just read it back slowly, you'll find the word "never" in there if you're more careful.
You are also choosing to presume incompetence of these issues on the part of the author where I see none demonstrated. Even he bothered to explain his, fairly common these days, use case (JSON response processed on the client with javascript). If you want to argue against this sort of thing be my guest, but you're not really going to reverse the trend. Either way it isn't a debate I'm very interested in.
1) Exactly. This doesn't help at all with server-side rendering of times, which is usually the use-case (times associated with forum comments, etc.). IP address detection is pretty annoying to do (and doesn't help with VPN's etc.), but a quick <script> in the <head> of any page that does an instant "redirect" to put the JavaScript timezone info into a server-side session variable is a functional, albeit hackish, solution. (If you don't have JavaScript enabled, then just serve up UTC times, it's an edge case.)
2) Usually your times are stored server-side in UTC, so you never have to worry about timezones anywhere. It simplifies things a great deal. "Naked" = UTC. You assume that, whenever it's stored, it's already been translated from the user's timezone when the date was initially generated, or else the time it happened on the server was the actual time.
Sorry, I meant naked date/times that are displayed on a page. It might be that site A gets the user's local time zone correct, but site B, C, and D don't. By displaying the time zone abbreviation next to the displayed time it removes all ambiguity and possibility for error. Also, if it's a time zone abbreviation that's displayed (e.g. EDT) make sure to mark this up properly and fully explain which time zone and country this is for. I can't remember which, but there are some time zones that have the same initialisms. Some don't have initialisms at all, and users from, say, Poland might not know what PDT is either.
This is what we did on a recent project. The times were left at UTC with a hover tooltip (JS with a fallback to title="Coordinated Universal Time") and we used the "timeago" plugin for jQuery http://timeago.yarp.com .
An option to override this is a must, I frequently use VPNs and as a result appear in many different countries through-out the day - It's bad enough with google repeatedly blocking my accounts for suspicious logins, without having to worry about timezone differences too.
Also, it'd be nice to ALERT me when my timezone has changed and give me an option to keep the old one, or use what you think my current one is.
In this case progressive enhancement is offering a GMT date or other sensible default, and offer another date after javascript kicks in.
Personaly, I think for anything where timezone is relevant, the best move is to always let the user manually enter the timezone he/she wants, or have it match the timezone of the event/service he's looking for, and of course allow for override, so changing timezone has to done client side.
I.e. if I am in Germany and search from a flight taking off from Taipei two days from now, I don't care about the departure time from the German timezone. Same thing if I reserve a restaurant in Germany while I am in Taipei, you'll want the german time for the reservation. For something internationally broadcasted showing the UTC time as default and provide a way to adapt to other timezone is OK, as the event has no local anchoring anyway.
People can do the calculation for timezones, eventually some opt to not change their phones timezone to keep in sync with other more important schedules, etc.
Trying to do 'smart' things seamlessly is often just screwing with the user.
To start, it doesn't work if you use VPNs. Second, it doesn't update when you travel.
Here's one example. Even though I'm logged into Google and used Google Maps' 'pinpoint my location' feature, Google Reader is currently emailing me my daily schedule (a feature I enabled recently) in the afternoon. That's also despite my appointments being annotated with timezone information.
Also, it should be noted which time zone a time is in. A naked date/time is about as useful as saying that you're 3 units away from me. What unit does "unit" represent? shrug