News for hackers. Stuff that matters.
Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @04:55AM (#20490519)
Quite amazingly neither of these pages work without JS.

How difficult is it to make a page saying 'not found' using static HTML, perhaps with a GIF if you want minor animation.

I mean, how difficult is it to not use tech that you don't need?

Edit: loved the FT 404 though

Re:Why wasn't this page found? by dang on Sunday July 21, 2019 @04:02PM (#20493330)
We detached this subthread from https://news.ycombinator.com/item?id=20490102.
Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @04:10PM (#20493369)
Forgive me, I don't recall reading about this act in your guidelines - what does detaching it mean? I can still see it in the original thread even when not logged in.

Also, for my own record, do you consider this discussion inappropriate to the subject of natty 404 pages? Asking as I kicked it off.

Re:Why wasn't this page found? by dang on Sunday July 21, 2019 @04:14PM (#20493394)
Detaching just means it becomes a top level comment instead of a reply to its original parent. The main reason we do that is when a subthread is off topic. Especially if it's a generic tangent like JS vs. no-JS, which gets repeated often.
Re:Why wasn't this page found? by dangrossman on Sunday July 21, 2019 @05:05AM (#20490546)
You need JavaScript to use the web in 2019. It has nothing to do with difficulty. You also need an ID to get into the boarding area of an airport and you can't smoke in restaurants. It's never going to be 1995 again. It's time to stop complaining about this.
Re:Why wasn't this page found? by klez on Sunday July 21, 2019 @05:19AM (#20490569)
Those are not remotely the same. A web page can function without JS. It's not something you need to display some text and some images. And it's not harmful to others. Smoking in a closed space is.

Also, I can't believe every time this refrain pops up we need to be reminded that js not loading is not only a problem for those deactivating it explicitly but also in those cases when it didn't load for any number of reasons (like a bad connection). You're doing your visitors a disservice if you need js to load static text and pictures.

Re:Why wasn't this page found? by Avamander on Sunday July 21, 2019 @07:33AM (#20490878)
A web page can function without JS, but a lot of things seriously aren't doable with just HTML5, no matter how hard you try.
Re:Why wasn't this page found? by progval on Sunday July 21, 2019 @07:57AM (#20490963)
It depends on where you draw the line between what you call a webpage vs a webapp. If a webpage is something with just text, images, and non-interactive forms (and audio and video to a lesser extent), then it's perfectly possible.
Re:Why wasn't this page found? by vbezhenar on Sunday July 21, 2019 @12:20PM (#20492034)
Nobody complains that Google Maps are using JS. People are complaining that developers abusing JS just to show simple page or video which is perfectly doable with HTML 5.
Re:Why wasn't this page found? by Avamander on Sunday July 21, 2019 @12:25PM (#20492064)
Showing a simple video isn't simple without JS, it's just clunky in all aspects.
Re:Why wasn't this page found? by vbezhenar on Sunday July 21, 2019 @02:36PM (#20492900)
It's very simple: just use <video> tag.
Re:Why wasn't this page found? by kbenson on Sunday July 21, 2019 @01:18PM (#20492393)
I think you're mistaking simple for something else. Simple can easily be clunky. I would even say simple is often clunky.

Making something elegant, and full of features, and pretty is often complex.

Re:Why wasn't this page found? by Avamander on Sunday July 21, 2019 @01:55PM (#20492624)
It's not simple even for the developer to use the video tag if you want a thing that works.
Re:Why wasn't this page found? by briandear on Sunday July 21, 2019 @08:20AM (#20491026)
Just a curiosity, but has anyone ever become addicted to secondhand smoke?
Re:Why wasn't this page found? by Retra on Sunday July 21, 2019 @09:28AM (#20491221)
Re:Why wasn't this page found? by lofikrom on Sunday July 21, 2019 @12:49PM (#20492208)
Lots of ad and script blockers block JS nowadays, you can definitely go without it. For my browsing habits at least, I find I can disable JS globally and selectively unblock it when I come across a site that does require JS. It's doable, and a tad bit safer too.
Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @05:19AM (#20490570)
>You need JavaScript to use the web in 2019

No you don't. Nor should you ever if the page doesn't need it.

Having your code running on my machine always was and always will be a security risk. If you don't understand that you shouldn't be in that job.

> You also need an ID to get into the boarding area of an airport and you can't smoke in restaurants

Respectively, that's because a boarding area is not a public area, and relevance of smoking to this?

> It's time to stop complaining about this

No, it's time web devs understood the implications of their job, and the risk they put their users at if done improperly.

An axiom of technology design: Simplicity. If you don't need X, don't use it.

Edit: so you're the "Founder of Improvely: https://www.improvely.com" which "Track, Test and Optimize Your Online Marketing". That explains something. No, no, no, you're not going to track me. I am not your data point.

Re:Why wasn't this page found? by Jonnax on Sunday July 21, 2019 @06:57AM (#20490780)
It's your right to choose to browse the internet without JavaScript enabled.

If a website doesn't run then it's upto you to either accept that you won't see their content or enable JS.

People who complain about sites not working without JS in comment sections are silly. Nobody is going to be convinced to change.

Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @07:38AM (#20490894)
You're correct (upvoted for that), it's my right and I decided long ago. I'm ok paying the price, also reaping the rewards of very fast page loading, zero tracking, and shutting off a huge vector for malware.

But others with less tech knowledge (which is 97% of the population I guess) are not in a position to make the choice and have to trust. Some people abuse that trust for profit. Other web devs are well-intentioned but clueless about the risks they put on the users.

Also I disable JS long ago because I knew that there would be unknown unknows, and bingo: (https://react-etc.net/entry/exploiting-speculative-execution...) "Exploiting Speculative Execution (Meltdown/Spectre) via JavaScript"

It's a matter of trust; trust is earned; the industry as a whole hasn't earned it.

Further reading:

Remember that there is no code faster than no code. -- Taligent's Guide to Designing Programs

Simple things should be simple and complex things should be possible. -- Alan Kay

Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away. -- Antoine de Saint-Exupéry

[...]But there is one quality that cannot be purchased in this way---and that is reliability. The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay. -- C.A.R. Hoare, "The Emperor's Old Clothes", Turing Award Lecture (1980)

Increasingly, people seem to misinterpret complexity as sophistication, which is baffling --- the incomprehensible should cause suspicion rather than admiration. Possibly this trend results from a mistaken belief that using a somewhat mysterious device confers an aura of power on the user. -- Niklaus Wirth

The difference between a good and a poor architect is that the poor architect succumbs to every temptation and the good one resists it. -- Ludwig Wittgenstein

Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity. -- David Gelernter, "Machine Beauty", Basic Books (1998)

Fools ignore complexity; pragmatists suffer it; experts avoid it; geniuses remove it. -- Alan Perlis

The cheapest, fastest, and most reliable components of a computer system are those that aren't there. -- Graham Bell

[...]Simplicity and elegance are unpopular because they require hard work and discipline to achieve and education to be appreciated. -- Edsger W. Dijkstra

Controlling complexity is the essence of computer programming. -- Brian Kernighan

Complexity is a sign of technical immaturity. Simplicity of use is the real sign of a well design product whether it is an ATM or a Patriot missile. -- Daniel T. Ling

There's an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone. -- Bjarne Stroustrup

The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents. -- Nathaniel S. Borenstein

Re:Why wasn't this page found? by alluro2 on Sunday July 21, 2019 @11:04AM (#20491590)
While I don't particularly agree that it's totally acceptable for a static 404 to need JS, I also don't really follow your concern for security. I've been browsing the web since 1998 and not once has my machine been compromised by malware due to normal JS on a normal website - so not sure what the "huge vector" impact is...Concern over Meltdown exploit through JS? Again, when just browsing the "normal" web? Maybe you're working on top national security secrets from your home while opening a LibDem site?
Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @01:24PM (#20492431)
Let's start with the answer in a nutshell: a personal approach to safety, and a systemic approach to safety.

> Concern over Meltdown exploit through JS? Again, when just browsing the "normal" web?

I am not an expert in these things but what I do know, and it is backed up by the quotes from various well-known engineers (in the looser sense, encompassing programmers) I gave, is that complexity costs. Security is one such.

From https://coar.risc.anl.gov/meltdown-spectre-and-speculative-e... "Using these instructions, a malicious program can be created that leveraged speculative execution to read and send every address in memory to the attackers [...] Additionally, the authors crafted a JavaScript program that leverages the browser process that houses it to access additional memory locations. Both of these proof-of-concept attacks violate memory isolation boundaries that have delineated program execution spaces"

There were some quick patching and releasing done to browsers for this (coarsening the granularity of the timer IIRC) so I guess they must have cared.

If you can read outside process boundaries then theoretically... well, do you bank online? Do you ever put your credit card number into a website? If you don't do you think other people do?

I don't know if these cpu flaws can be realistically used, and the data exfiltrated from your machine, but I know with certainty that no JS = no exploitation will ever be possible with JS.

Example: this happened in about 2012 with a company I was working for. I'll necessarily be vague, sorry. We were phished with a precision that was shocking and had nearly £20,000 taken from the company account. The malware came with browser-embedded java (not javascript!). Our off-site support guy, R, came in after and me and him uninstalled java from all the machines (~20, small business). Without the java the attack could not have taken place (the attack was 2-pronged and needed more than the java, but it was a necessary).

The broader lesson is, if there's a hole it can be exploited, but if no hole then no exploit is possible there. This should be self-evident.

OK, my GP has desktops in their office which are connected to the web, and allow JS to run. Are my medical records safe? Are yours?

A company I worked for a year ago (turnover several million) had the browser screen hijacked with a warning I had malware and to call this number. I had to call support to verify it was a scam - remember I don't see these at home so I literally never saw this before and had to check. If I'd been a naive user at home I'd have been on the phone to wherever so the nice man could help me.

The machines in that office would crawl for an hour once a week when a malware scan was being run (run late, but staff often worked late so it bothered them occasionally). Malware checker and human time interfered with - another cost.

What about the cost of your browsing time of slow page loads and annoying audio/video? The cost of being tracked? Is this acceptable to you? Not for me it isn't. We may differ in what we're prepared to tolerate though.

If more sites are allowe to abuse js because people won't push back then that js-disease will spread and sites will choose to use it. If there's pushback then it will be reduced and we start to gain a kind of herd immunity.

You asked about malware, does this help?https://www.trendmicro.com/vinfo/us/security/news/cybercrime...

Just google "javascript malware". You won't run out of hits. Stupid net security holes and we are talking about cyber warfare - closing dumb js holes aren't the end but they might be a start. More importantly it'll be the start of a security mindset. I want us to think long-term, systemic, not "it probably won't happen".

I should not have to point this out. It should be self-evident that abusable things will be abused. It's just a minor variation on Power Corrupts. Oh well.

This is a bit of an unstructured brain dump so sorry for it not being precise but I hope it clarifies my position.

Edit: much to me and R's annoyance the bank refunded the stolen cash, so the boss never felt need to do a proper security review.

Re:Why wasn't this page found? by benj111 on Sunday July 21, 2019 @09:02AM (#20491145)
I'm surprised by the downvotes for this. There are downsides to using Javascript for everything, so it isn't a free lunch.

Move fast and break things is increasingly less defensible for what is a mature technology that the world relies on. And Moores Law is a thing of the past, it isn't really tenable to just take the view that hardware will 'fix' your performance problems. Then there are the security and accessibility considerations.

I suppose Javascript is the single use plastic of the digital world. In its place there aren't really any good alternatives, that doesn't mean you should use it everywhere.

Re:Why wasn't this page found? by jsmeaton on Sunday July 21, 2019 @09:57AM (#20491334)
It’s being downvoted because it’s a boring tired comment that adds nothing new. These discussions are had in nearly every thread.
Re:Why wasn't this page found? by benj111 on Sunday July 21, 2019 @11:02AM (#20491584)
I wouldn't say every thread at all, but maybe we read different kinds of submissions.

Plus many things are repeated ad infinituum. I can guarantee any discussion on wind power will have someone saying we should be going nuclear. Every discussion on electric cars will devolve to a discussion on Elon Musks personality, every discussion on facebook will lead to a mention on privacy. People have opinions, they've come here to express them, most of it will retread old ground, if there was nothing new to add, 90% of submissions could just be linked to the original discussion, that isnt what happens, (although old threads are generally linked to) so it seems reasonable if we're going to re-have all the other discussions, to re-have this discussion.

And finally, it seems to be the rule that to be downvoted, an opinion has to be wrong and/or offensive. So if there is a downvoted comment that seems to be neither I'll then take the time to find out if I was wrong, so for me, downvoting comments that you just don't want to read, just adds noise. I'll admit that that's personal to me, and its entirely likely that others see downvotes differently, that is an annoying consequence of votes being such blunt instruments.

Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @01:30PM (#20492469)
This sidesteps the truth of my point. Rebut me with arguments, not petulant downvotes. If you have no arguments, maybe, just maybe, you're wrong.
Re:Why wasn't this page found? by scarejunba on Sunday July 21, 2019 @02:36PM (#20492905)
Sometimes you're right but also irrelevant. For instance, if I started posting "2+2=4 and 1+1=2 and addition is associative so 1+1+1+1=4" then I'm right but also useless. So the correctness is irrelevant to the discussion.

We don't live long enough to examine every true argument. It is important to us to filter to useful ones. In that respect, starting the JS debate is the equivalent of starting a neovim vs xemacs debate, both of which are like chewing gum that's got all the flavour gone in the first hour.

Re:Why wasn't this page found? by tempguy9999 on Sunday July 21, 2019 @02:48PM (#20492963)
Your maths example is incontestably true so no-one would waste time debating it.

Claiming js is essential to all modern browsing is not true and I am contesting it because in practice its use opens up bloody great security holes.

And you are still not addressing my obvious and relevant point, that not using js closes those holes. Stop downvoting and explain why you think compromising browsing safety is your right.