Live data from Hacker News

Everyone has JavaScript, right?

kryogenix.org

91–100 of 101 posts

Re: Everyone has JavaScript, right?

#91
post #32

Earlier quoted context omitted.

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.

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.

I find myself hitting the view source button to read (mangled) text in JS source way too often.

Or worse, unmangled text in JS source. Or text that's set to display:none until the JS gets to it.

If you're going to compile things clientside (looking at you, markdown), at least put the raw text in something the browser can display before the JS compiles it.

Re: Everyone has JavaScript, right?

#92
post #49

Earlier quoted context omitted.

> such as clueless users installing malicious extensions or luddite users switching off js. So if I run arbitrary, potentially-malicious code from the Web, in the form of a browser extension, I'm "clueless"? Yet if I don't run arbitrary, potentially-malicious code from the Web, in the form of JS, I'm a "luddite"? Considering that many browser extensions are implemented in JS, the only difference is in control: users…

Extensions have access to browser APIs not available to webpages and run on your every request. Thus they are inherently more dangerous. So installing unsigned extensions from questionable sources makes you clueless, yes. Vanilla js running on webpages should be considered relatively safe. It's sandboxed and not able to do anything - malicious of not - outside it's restricted environment. It can't even get your locat…

> Vanilla js running on webpages should be considered relatively safe. It's sandboxed and not able to do anything - malicious of not - outside it's restricted environment.

The number of exploits requiring JS versus the number of exploits not requiring JS seriously disagrees with that opinion.

JS is a dynamic language that browsers put a lot of effort into JITting to be fast and limiting memory usage. And as such, the engines are complex. And as such, it's inherently hard to keep safe.

The v8 engine has literally over a million lines of code.

> If you could somehow disable all logic from executing in your OS native apps, would you do this by default?

Yes. And I actually do this on a regular basis. There are a lot of things I'll only run in a VM, or run in a VM the first time to see what it's attempting to communicate with / do (and occasionally block said communication for later). Not perfect, but better than nothing.

Re: Everyone has JavaScript, right?

#93
post #7

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

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 instead of 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 wer…

> 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.

Re: Everyone has JavaScript, right?

#94
post #83

See also: http://motherfuckingwebsite.com/

http://bettermotherfuckingwebsite.com/

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.

Re: Everyone has JavaScript, right?

#95
post #12

Earlier quoted context omitted.

The point being made is at the bottom - progressive enhancement. If at least the html makes it across the wire, a progressively enhanced website will still "work": you can still read content, click links, submit forms http://jakearchibald.com/2013/progressive-enhancement-still-...

See this comment: https://news.ycombinator.com/item?id=9432629 The web is no longer a collection of text content with links and forms. Many, is not most, web apps cannot be represented using html alone as progressive enhancement suggests. The core functionality just isn't there.

There is a difference between a web page and a web app. People need to stop conflating the two in discussions like this.

Re: Everyone has JavaScript, right?

#97
post #41
post #15

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.

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.

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.

Re: Everyone has JavaScript, right?

#98
post #20
post #15

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.

The comparison is not very good. There are plenty of arguments around not driving cars; safety is a valid concern.

xD

Re: Everyone has JavaScript, right?

#99
post #51
post #46

Earlier quoted context omitted.

> Implementing curl app server-side would require double work which is against principles of progressive enhancement (or programming in general). That's exactly the use-case of server-side JavaScript! Write a small library to build curl commands; use it in both the web page's JS and on the server, with a small shim on each. 1¼ times the work.

Thus forcing me to use js as a server-side lang.

Yes, that is the catch. But I'd rather impose the burden of writing JavaScript on developers than the burden of requiring JavaScript on users.

Re: Everyone has JavaScript, right?

#100
post #97
post #41

Earlier quoted context omitted.

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.

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.

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.
Post reply on HN