
Everyone has JavaScript, right? - insin
http://kryogenix.org/code/browser/everyonehasjs.html?
======
donatj
I find more and more sites using JS for layout and it being an incredibly
frustrating experience on my phone. The whole site loads and I'm reading the
article for 4 or 5 seconds and then the js kicks in, scrolling locks,
everything stops while The page redraws. On some sites, including Android
Centeral of all things, this can stop me from reading text I ALREADY HAVE for
upwards of 20 seconds while it reflows. Simply unacceptable.

ALWAYS keep in mind that people are coming to your site for the text almost
exclusively. If your stupid JavaScript interferes with the consumption of said
text you have failed as a developer.

~~~
protomyth
At this point my mobile experience is go to website, read a couple of
sentences, watch javascript muck with the layout as you describe, then a full
screen popup wanting me to register or download the app, followed by a part of
the top of the screen with a app store link for the app, then I get to read
the article - maybe.

I think we need something that is to websites as markdown is to word processor
files.

~~~
donatj
I'd like a browser that just removes all the CSS and JS and gives me simply
the text, like Safaris reader mode, but without the need to ever leave it.

~~~
chrisweekly
It's not exactly what you described, but in my experience "Clearly"
([https://evernote.com/clearly/](https://evernote.com/clearly/)) does a v nice
job delivering a clean, readable, stripped-down "just the text, please"
version of a given page.

------
cabirum
Right, but these problems are not specific to javascript requests. Any request
can fail, be blocked, interfered with, or partially received. Users can switch
off CSS, too. Html page may not load completely. So what?

Some of these issues are fixed with https or http/2\. Some with CDN fallbacks
or just sane coding. Some are not developers problems - such as clueless users
installing malicious extensions or luddite users switching off js.

Why not ask 'Everyone has html, right?'.

~~~
bottled_poe
I don't want dynamically loaded content.

I don't want pages to reload unexpectedly.

I don't want a site to break standard UI behavior.

I don't want externally hosted scripts to track my activity.

None of this adds value to my experience as a user.

I _do_ want to view the content - ideally in a single HTTP request.

Just load the damn content.

~~~
donatj
Amen.

------
moron4hire
I'm not sure I entirely agree that JavaScript should be developed in a
Progressive Enhancement style, for two reasons:

If you can live without it (the "progressive" part of progressive enhancement
implies that the site is still usable without the JS), then I don't think you
should be using JS at all. Semantic HTML and CSS are pretty amazing at
adapting content fluidly and dynamically to a wide range of users and devices.
Search engines expect documents to be laid out in a certain way. Web scrapers
can add a whole pile of usefulness even to sites that don't create explicit
public data APIs. You're going to have a serious hell of a time making it any
better, and can easily make it a lot worse.

And on the other hand, content sites aren't the be-all, end-all of the Web
anymore. The Web is increasingly a deployment platform for applications, and
there are a whole host of applications that just can't be done in the browser
without JS. Luddites who complain about "but I got JS disabled" aren't the
target market for an image-editor-in-the-browser. Failing to load JS at that
point is just plain failure to load the application and no amount of Progresso
Soup is going to help you.

So yeah, I much prefer all or nothing.

~~~
scrollaway
The web is trying to do two things at once right now: Be a platform for
applications and be a medium for textual, document-like content.

The former obviously needs a proper scripting language. The latter should
definitely be built with progressive enhancement in mind because it's a good
thing.

Why this urge, on either side, to immediately apply their issues to an area
which doesn't warrant it? Apps can't be progressively-enhanced without making
things stupid. Documents shouldn't rely on javascript to be readable (in most
cases).

~~~
lfowles
> The former obviously needs a proper scripting language.

I wonder, have there been any experiments in major browsers to execute non-
javascript code?

~~~
dragonwriter
> I wonder, have there been any experiments in major browsers to execute non-
> javascript code?

Chrome currently supports NaCl, which allows running native-compiled non-JS
code in the browser, but doesn't provide direct DOM access. A number of
technologies have been used to provide non-JS code in browsers through plug-in
APIs. And IE has directly supported, at different times, a number of non-JS
languages in the browser as well.

So, yes, and not just "experiments".

------
demarq
Firstly and this may suprise you you... We know you exist. Yes you with a
tinfoil hat, you under a repressive corporate regime. You keep trying to make
your presence known through ranty blog posts, angry comments thinking we dont
know you exist. We know but we found that not only are you a minority but our
lives as designers and developers are a million times easier if we just ignore
you. Yes i know you want to surf with vim or IE6 but thats your choice. You
make your bed now lie in it but dont drag the rest of us with you!

~~~
vacri
Ranty, angry comments? Pot. Kettle. Black.

The lives of designers and developers are a million times easier if you just
ignore accessibility requirements, too. But you know what? If you can't make a
good design that caters to a variety of consumers, then you're not a good
designer. Design is about melding form and utility, not just making something
pretty. The less utility you have, the more you are an 'artist', and the less
you are a 'designer'. Besides, if you don't care about anything but the most
common, optimum user, you may as well return to the "This page best viewed at
800x600 on Netscape Navigator" '90s.

------
gtirloni
I didn't get the point this website is trying to make. All distributed apps
are like that at time of delivering the code. If that's so wrong with
Javascript, what's the proposed alternative (that has a chance of being
available everywhere)?

~~~
dreen
I think the point of this is more against requiring some JS to load and work
in order to do things which do not require JS in the first place, like
displaying some static text or laying out the page.

It also highlights the importance of progressive enhancement.

------
stephenr
I'm so glad to see there is still some sanity in the world.

------
tossaweigh
See also: [http://motherfuckingwebsite.com/](http://motherfuckingwebsite.com/)

~~~
kps
[http://bettermotherfuckingwebsite.com/](http://bettermotherfuckingwebsite.com/)

~~~
TheLoneWolfling
First thing I did, as I usually do with sites that have annoyingly small text
width, was inspect element to increase contrast / width / remove the
doublespacing. Then I read it. ...irony.

------
dto-games
The thin-client revolution is finally here, and what an awful pile of shit it
is. Whatever happened to software that just works?

Answer: Microsoft. Their legal team started the browser-as-OS delusion with
their 1990s freakout about Netscape; this was an anti-consumer, anti-
competitive lock-in strategy which now masquerades as a fundamental principle
of Good Clean Living for people who give speeches about their startup's
Beautiful, Human Responsive Javascript Libraries or their genius-revealing
reimplementations of Emacs that can only edit one language (namely
Javascript.)

Hence today instead of having a computer, we have DMCA-hardened thin clients,
and with each click we download what amounts to a freshly-coded never-debugged
malware-infected EULA-wrapped software update; and when you enter a subway
tunnel the whole universe stops working.

Yet on the linked essay he likens turning off Javascript to removing the
steering wheel from your car, which I find to be both idiotic and revealing:
Your steering wheel doesn't stop working when your car goes into a tunnel. But
you can see why a Googler thinks like this: Google makes a car with no
steering wheel, which really might stop working properly when it loses signal
in a tunnel. The real benefit of Thin Client is to the employment prospects of
Javascript programmers, to the Google whose Android and browser and Javascript
VM you will need to do anything useful or performant on Googlephones, and to
the war criminals in technology, finance, and intelligence who carry out the
destruction of human culture via airdrop of free surveillance-gathering
Javascript phones, where Responsive Javascript libraries conspire with distant
servers to jack up the valuations of this or that group of ten HN-darling
companies, and hire three or four guys to make sure the top comment always
defends Apple's weekly anti-competitive "this is what's best for consumers"
move, or reminds users that There Is No Way To Prove This Isn't Another Tech
Bubble.

The whole concept of browser-as-OS has turned out to serve the permanent
security state and other old-money beneficiaries of the Bronze Age
kulturkampf. Thanks to the thin-client revolution and DMCA, secure software
that actually WORKS is mostly illegal.

~~~
1971genocide
haha, that was a funny rant.

You have expressed many problems with js clearly out.

Is there a solution ?

I do not see a better alternative, I didn't start programming in js out of
spite. I tried to learn the old neckbeard C infrastructure __formally __and it
seemed to be a mess. Even though I understand how most of it works, if you are
trying to create products of value to people you really cannot use it.

Hopefully my kids will experience a better experience with computers but for
now js will do.

<3

~~~
dto-games
Hey thanks. I'm good at ranting. I also have that hope for a better tomorrow.
Just to be clear, I wasn't advocating for C/neckbeards Take care :)

~~~
1971genocide
you didn't advocate anything.

Are you scared for advocating something that will be down-voted mercilessly ?

------
lerouxb
Same thing applies to any content type. Images, CSS, video support, etc. Why
pick on JS specifically?

~~~
z1mm32m4n
If an image fails to load, the browser draws a little box with some alternate
text describing that box. If the CSS doesn't load, your text and content is
displayed in a weird font without the grid layout you were using, but if you
wrote your HTML semantically (using <h1> instead of <div class="title"> etc.),
the browser can still show most of your content, and you can still move around
on the page.

If the JavaScript fails to load and you were using it to significantly alter
the content on your page, for example loading a news article asynchronously,
the entire page fails to load.

I don't mean to pick on this app in particular (I actually think it's really
cool and I plan on using it and learning from it), but take a look at what
happens to [http://hswolff.github.io/hn-ng2/](http://hswolff.github.io/hn-
ng2/) when you switch off JavaScript--it's completely unusable. Now try
switching off JavaScript on Hacker News--all the links and comments are still
there.

~~~
TheLoneWolfling
> If the JavaScript fails to load and you were using it to significantly alter
> the content on your page, for example loading a news article asynchronously,
> the entire page fails to load.

Worse. Half the time the content is sent synchronously in the initial HTML,
but keep hidden until a JS script has its way with it. Looking at you
Markdown.js.

------
StillBored
Lazy, that is what I call it... In the past the rule was degrade gracefully if
something keeps the JS from running. Now days its like "screw you, we can't be
bothered to make it mostly work with css, so your out of luck if the JS didn't
run".

For me, I run with noscript. Most of the places I frequent (here for example!)
work great without any JS, other places less so, but I can selectively enable
what needs to run, and many times when I find those sites that simply don't
work without javascript, I just click back, and ignore them. I don't trust
sites that can't at least load some basic content to convince me they aren't
just a malware vector.

------
lucb1e
Ten edge cases still makes for an edge case. It's a good to think about what
we're doing but for all practical reasons, yes "Everyone has JavaScript,
that's right!"

------
ChikkaChiChi
Disappointing that the site links to a bunch of sources, except when it drops
the knowledge bomb of "many" corporate firewalls blocking javascript.

------
clutterjoe
People browsing the web on a train while entering a tunnel, that's got to be
at least 55% of all web traffic, no?

------
gboone42
Amazing how many of these probably go away by ditching your CDN and using
SPDY/HTTP2.

------
serve_yay
Sometimes HTTP requests don't finish successfully, so don't use JS. OK.

------
larvaetron
I'm confused, is caching not a thing anymore?

~~~
briandear
I don't think the usability of a site or load times should require caching.
Caching should enhance, but it should not be a fundamental requirement to make
a site not suck. Caching is salt and pepper but shouldn't be the steak.

------
tomjen3
Corporate firewalls that block JS? Thats so stupid I don't doubt it is true.

------
zupa-hu
While the point may be true, it's like don't drive a car because people do die
in car accidents. The post is misleading as most of the cards present rare
edge cases where JS doesn't work. Show percentages as well.

Yes JS may not work 0.1% of the time. So let's fix it once all the higher
priority issues are fixed.

~~~
M2Ys4U
You're underestimating how often JS doesn't work by an order of magnitude.
According to the UK GDS JS doesn't work for up to 1.1% of users.

~~~
zupa-hu
Woohoo, an entire percent.

There are 2 interpretations of the situation. Either that 1.1% is a totally
pressing issue and almost the entire industry is an idiot for not getting it;
or the industry is actually pretty smart and also market forces do their work
and it turns out it's not as a pressing issue relative to other things. I like
to subscribe to the second idea.

~~~
anc84
Accessibility for 1% can be a pressing issue if you consider your site/service
as something important and you do not want to keep disabled users out. Just as
food for thought. Letting the market force people away is not very social.

------
jmkni
If CDN's based in the US need to do maintenance, they will probably do it late
at night _in the US_ , which might be at peak time for you if your website is
based outside of the US.

Just a though.

~~~
dagingaa
You might want to consider a different CDN in that case.

~~~
briandear
Don't most of the notable CDNs have a worldwide presence? Akamai, for
instance, seems to be everywhere.

------
theDustRoom
Why has this been voted up so much? It's dog shit.

