Hacker News new | ask | show | jobs
by thrownaway122 4026 days ago
> javascript should be optional if possible

I got a blank page so I closed the tab.

Any page that requires javascript and I don't need to use (at the level of do my taxes) or that I don't trust the owners of gets the same treatment.

So yeah optional javascript is a thing unless 100% of your audience are absolutely required to use your site.

EDIT given that sites today use google analytics instead of their own server logs I wonder if non-javascript users just don't even get logged by the javascript-for-everything brigade?

5 comments

You are a minority. Perhaps not here (HN) because "I disable Javascript" seems to be a pretty trendy thing to say (:P), but in the world at large you are.

It's bad enough we have to build websites that work on IE8. We have to worry about screen readers and other accessibility problems, but we also have to worry about a fraction of users that disable a fundamental browser feature literally every site uses? Nah. It'll break and you can expect it to break! Sorry. :)

You don't really have to 'worry' about those things, you just follow best practices and - for the most part - they get dealt with automatically. Following the standards always gets you additional benefits that the "javascript required" crowd always gloss over. As a trivial example (there are many more), using a non-existent fragment identifier as a link target and capturing the click event doesn't just break when javascript is unavailable, it also breaks opening that link in a new tab.
You have to make your site accessible to search engines, so as long as you're not doing something weird like using javascript for styling and layout, just treating users who have disabled javascript as search engines should work just fine.
Google has been working pretty aggressively at learning to crawl JS-framework-powered apps lately. I'd still play it safe and serve up HTML when possible, but JS isn't the SEO black hole it once was.
For text and images and videos (which is what a webpage is for after all) if one sticks to a simple html and simple set of css do you need to worry about all those issues? Or do they just go away? e.g could a simple html version served to e.g. screen-reader using users also work for non-javascript using users?

>literally every site uses

Ironic that you would post that on a site that works without it...

>I got a blank page so I closed the tab. Any page that requires javascript and I don't need to use (at the level of do my taxes) or that I don't trust the owners of gets the same treatment.

It's not like that behavior matters. That's about 0.001% of computer users.

Might as well say "If it's not available in Gopher format I don't care".

Yes but that 0.001% are within the influencial 1% of users. I've literally had people see what webpages look like in my browser and then ask for no script installed. I didn't understand why until a few minutes ago but I do now.
>Yes but that 0.001% are within the influencial 1% of users.

No, they just believe so about themselves.

Possibly. I do not claim to have ever driven social media traffic or made a trending hashtag or a viral video or even shared a "top 10 reasons why" article with anyone. However, I do get people asking what devices to buy/what programs to use/how to do stuff quite often.
So in reponse to all the javascript brigade here I just tried to view some websites I commonly visit without blocking to see what I'm mising...

I do not know how you browse with javascript enabled! WOW the experience is poor! My computer is a standstill with two tabs open. Stuff keeps flashing at me. The pages load and then after a few seconds everything gets moved around again. Simple functionality doesn't work as I'd expect anymore (every website seems to be different in how things work). Adverts everywhere (and everytime an advert refreshs I can see my computer slowing down).

EDIT and now (some) videos start autoplaying when I scroll past them. I don't want that!

Actually there is oftentimes a static "non js" tracking-image embedded within a <no script>-tag.

Oftentimes this totally gets forgotten btw. And it is not only GA - it is Adobe Analytics, Heap, every conversion-tracker by Facebook and Adsense and the likes.

SO yeah - we (so called) web analysts know that and even have ideas/means to track the number of people that disable js by default or that block every form of (browser based) tracking.

tl;dr You get locked (most of the time), but you can block this (most of the time) as well.

A company I worked for years ago actually had an analytics tool they sold that just used a transparent tracking gif. We managed to sell pretty expensive subscriptions way after Google analytics completely pwned its capabilities thanks to industrial companies being strangely un-web-savvy.
How would one block this?
It's typically an image hosted on a 3rd party domain that's on every anti-tracking plugin's filter list. (uBlock, Ghostery, Disconnect, ...)
Thanks. I guess anyone that does not enable javascript is running a anti-tracking plugin anyway...
There are unlikely to be more than about 100 people who would do that, it is just that most of them post here.
Well there is an addon for firefox (no script) that assists with it... I guess that that only has 100 users?