points by userbinator 10 years ago

This reminds me of a time when a site asked me to enable JavaScript for "a better experience". I had been defaulting to JS off for a long time due to how effectively it stopped ads and other annoyances, and see these messages a lot, but this time I was momentarily curious for some reason; I did, only to be immediately assaulted with a bunch of ads, some crap following the pointer/scrolling, slide-overs, and other distracting annoyances that I would not at all call "a better experience". Fortunately I didn't get malware, but since then I've been much more cautious.

I know many are rather fond of sayings like "JS off will break most sites", but I challenge you to experience the web with it off by default and turn it on only for the few sites that absolutely need it; depending on what your most visited sites are, you may actually enjoy it. I find that the majority of sites are perfectly readable without JS.

On the other hand, I wonder if there are sites which use JS to hide the content and display a "turn off JavaScript to view this article", or "install adblocker to view this article"...

pdkl95 10 years ago

I've observed that suggesting that JS isn't needed for most pages is one of the more reliable ways to get downvoted on HN. This is usually acco9mpanied with a complaint that their "web apps" need JS, similar to the "JS off will break most sites" fallacy that you mentioned.

The people making those claims probably believe that everything would break without JS, because they are looking at it from the perspective of a business or designer. If you consider your own site to be "broken" if the analytics/tracking doesn't work, or the fad "UX" effects are not rendered, they it's easy to believe that JS should be mandatory.

This point of view is based on a fundamental misunderstanding of what the web is. HTML is more concerned with semantic abstractions than the specifics of how a page renders (use a pdf if you want to control the layout). This was an important design choice because it recognizes that the client is responsible for the rendering, which is free to completely ignore the suggestions made by the page.

Unfortunately, far too many people don't want to accept that they don't actually have control over the browser.

  • ghughes 10 years ago

    > This point of view is based on a fundamental misunderstanding of what the web is. HTML is more concerned with semantic abstractions than the specifics of how a page renders (use a pdf if you want to control the layout). This was an important design choice because it recognizes that the client is responsible for the rendering, which is free to completely ignore the suggestions made by the page.

    You are describing the web as it was 25 years ago. No modern browser works this way.

    • robin_reala 10 years ago

      Are you including, for example, screen readers in that assessment? Because you’re wrong if you are.

    • pdkl95 10 years ago

      That's the fundamental misunderstanding I was talking about. You don't know what browser is being used. Ever. You only know what the user agent decided to describe itself as and the requests it made to your servers. None of that tells you anything about what happened on the remote computer.

      Besides, "modern browser" is a complete undefined term that is obviously subject to a lot of interpretation and opinion. Usually this term is used as either a euphemism for "I really want to put spyware on my website" or "I only use badly-designed tools".

  • TeMPOraL 10 years ago

    I have a less charitable view, when it comes to business. It's not about the misunderstanding of what the web is. It's about misalignment of values.

    Most of website design today is not done with the interest of the user in mind, no matter what the popular UX posts will say. The companies only care about users insomuch as it leads them to closing a sale. Which means trying to give away as little value as possible for as much money as possible in return.

    You can see it in contemporary design trends, and you can see it in the language used. Say, for example, "user engagement". Translated to plain English, it means making sure the user doesn't get what he came for too quickly. He'd then leave. You need to distract him with random stuff so that he stays "engaged" with your page.

    Most of the JS on the web is either gratuitous or simply user-hostile. It hampers productivity, it destroys readability, and it does it on purpose.

    And yeah, I'm fine with some of that; that's how dealing with businesses look like. I just wish people were honest about what they're doing. And then maybe little less user-hostile too.

  • TACIXAT 10 years ago

    I respect Do Not Track on my site. If you enable that the Mixpanel code will not be loaded. On the other hand, nearly all my network interactions are AJAX. I just tested it and you can't even login with NoScript running (because I hash your password client side before sending it). My site was actually pretty laughable without JS, I'll have to make something that warns people.

    I'm a programmer though. When I wanted to build a site I threw in some basic HTML, grabbed a CSS framework, and then I wrote a ton of lines of JS. That's just how building webpages makes sense to me.

    • pdkl95 10 years ago

      > warns people

      That can be an acceptable solution (or at least a workaround). It is always important to provide usable error messages when writing software. It is reasonable for some things to not work without JS.

      That's the whole point behind progressive enhancement, which is really just defensive programming. You never assume things worked, for the same reason you should always be checking return values for errors. How you respond to an error is something the programmer has to decide because sometimes you can simply continue without some feature, while other times making sure the user sees an error message is important.

yason 10 years ago

I do the same. uBlock allows me to disable scripting which is good because pages load faster and become more static. However, if a random page is unreadable because Javascript isn't there I just click a button (another extension) to reopen the page in an incognito window where uBlock doesn't run, and I get that full-blown modern browser experience but with no private data offered by my browser.

  • DennisP 10 years ago

    What is that other extension?

    • yason 10 years ago

      For Chrome/Chromium, I currently have "Incognito This Tab".

      (I used an extension called "Incognito This" first but one of its updates asked me the approve an array of extra unnecessary permissions which I obviously declined, then proceeded to uninstall the extension. The one I use now isn't quite as convenient but does the job.)

a3n 10 years ago

> On the other hand, I wonder if there are sites which use JS to hide the content and display a "turn off JavaScript to view this article", or "install adblocker to view this article"...

I've seen something roughly like this. If a site says "do something" in order to view content, like subscribe or bend over, I'll turn off CSS and sometimes see the content.

  • greenyoda 10 years ago

    "I'll turn off CSS and sometimes see the content"

    I've also noticed that in Firefox, going into "Reader View" will frequently turn a blank page into readable content (maybe because Reader View replaces the page's CSS with its own CSS).

    • a3n 10 years ago

      I used Reader View for a short while, but I noticed that it sometimes obscures content that was viewable before enabling Reader. Turning of CSS has been the most effective and consistent experience for me. Reader just substitutes a simpler CSS for the original CSS.

      Firefox: View/Styles/No Style.

      Or, single click: https://addons.mozilla.org/en-US/firefox/addon/disable-style...

aplorbust 10 years ago

"I wonder if there are sites..."

Imagine a future where common sense prevailed.

"Sorry, your browser is too complicated. Be smart and downgrade to something more secure."

(Replace "secure" with whatever word of improvement you like. Faster, smaller, fewer dependencies, etc.)

The "modern browser" serves many stakeholders, the least of which is the user.

gaius 10 years ago

Javascript, like Flash, doesn't do anything for the user, only for the developer or sponsor. Never did.

  • csours 10 years ago

    Ok, I'll bite; How would you do Google Maps without JavaScript. (or DDG Maps if you prefer)

    Edit: Why downvotes?

    • userbinator 10 years ago

      The interface would be slightly different but there's no reason why an interactive map viewer couldn't be done in pure HTML and CSS without JS, and then JS added for more enhancements like AJAX loading.

      In fact... it's been done eight years ago:

      http://www.appelsiini.net/2008/google-maps-without-javascrip...

      http://www.appelsiini.net/2008/google-maps-without-javascrip...

      Look at where the map images are coming from, copy the link, and play around with the URL parameters. Yes, this still works.

      I also distinctly remember playing some HTML adventure games with similar pan/zoom/click interfaces before the millenium, and they didn't require JS either (nor took quite as long as the apps of today to load, on hardware that was probably an order of magnitude or more less powerful.)

      • gaius 10 years ago

        Quite a few Javascript fanboys downvoting me but let me tell you the truth, users don't care about animated page transitions or whatever. Just want to read the article or buy the product or whatever. Javascript does nothing for them, never did, just developers with too much time on their hands is all.

        • MawNicker 10 years ago

          Users definitely care about scroll-to-zoom and drag-to-move. At least this one does.

          Also: auto-complete

    • TeMPOraL 10 years ago

      Google Maps is a wrong example. It's a (basic) web application, i.e. what is generally an interactive program that happens to be rendered in the browser. It's obvious that most web applications need JS on, because they're literally made of JavaScript.

      Web sites, however, don't need almost any JavaScript to work. 90% of it is either unnecessary design that distracts and confuses users, or actively user-hostile scripts (ad popups, trackers, interfaces designed to trick you into buying stuff, etc.).

  • ssalazar 10 years ago

    - in-browser chat

    - Google Docs

    - infinite scrolling (of course someone is going to say infinite scroll is a bad thing but it's clearly desirable to some)

    - input validation (before I click submit I can know that eg my desired username isn't taken)

    - others

    All of these need Flash or JS. For such a technically inclined community I'm always amazed at how folks on Hacker News insist that the Web remain a circa 1990s document browsing system.

    • TeMPOraL 10 years ago

      What's so surprising about it? That when I seek to learn information, I want to learn information in the most efficient way, instead of being slowed down by having to deal with all the artsy bullshit some designer put on the site? That, when learning, I don't like to be upsold shitty products and services I don't even need or care about? That when I seek to buy a product, I want a product that has a best price/value tradeoff for me and that I want to be done quick with it?

      Ignoring your first two bullets, which pertain to web applications - something completely different than web pages - you've just about listed the proper uses for JavaScript. Most of the JS out there is at best gratuitous design, and at worst actively user-hostile crap. Just visit a few random pages you use and ask yourself, how many JavaScript-powered features are there to actually help you achieve your goal in an efficient manner? Probably close to zero.

      Most websites are not designed with user's benefit in mind. They are designed to trick and exploit them. When 99.9% of the page size is hostile bullshit that only wastes electricity by spinning your CPU fan, you're really asking why so many people here ask for the pre-JS Internet back?

      The "circa 1990s document browsing system" may have been poorer in visual features, but it was much better a system than what we have today.