Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

1–10 of 412 posts

Re: A day without JavaScript

#4

Say what you will about jQuery, but it made graceful degradation easy (and encouraged). I do miss the days when people considered JavaScript an enhancement and not a dependency.

It was called progressive enchancement[^1] back in the days and it was good for you.

[^1]: https://en.wikipedia.org/wiki/Progressive_enhancement

Re: A day without JavaScript

#5
I found that Google actually works better without Javascript. It's much more like the Google of old (c.1998).

One significant enhancement (w/o JS) is that you can type something in the search bar without losing your current results while you're typing.

Re: A day without JavaScript

#6
I generally agree with what he is saying, but the web has moved beyond the point where its reasonable to expect websites to have JS fallbacks. It is just too prominent now a days.

I've always been a JS hater, though I have to code it frequently.. However, with that said I find the arguments against the language becoming more and more obsolete as the years go on.

Re: A day without JavaScript

#7

Say what you will about jQuery, but it made graceful degradation easy (and encouraged). I do miss the days when people considered JavaScript an enhancement and not a dependency.

Vue.js allows to do just that. But also allows to do things like react and angular 1. And is only 30k.

Re: A day without JavaScript

#8
One of my clients loads a 4.5 Mb bower.js (including Angular with a lot of components and jQuery), they also include an extra jQuery script, a full jQuery UI and several other scripts on each pageload. Nothing is minimized. The bower file alone has 300k in comments.

The CSS file is also nearly 1 Mb.

It's just a simple website with some forms.

They have 2 developers working on the site, a scrum master, a project manager and 2 testers but somehow they can't find the time to find out which legacy code they can remove.

It's only after I pointed out that they have an exceptionally high bouncerate on their (expensive) Adwords traffic and the slowest pageload time of all their main competitors that I managed to get some priority to optimize their site.

Serious question: are there any tools that can scan a full website for unused code and unused CSS?

Re: A day without JavaScript

#9
post #5

I found that Google actually works better without Javascript. It's much more like the Google of old (c.1998). One significant enhancement (w/o JS) is that you can type something in the search bar without losing your current results while you're typing.

If you hadn't noticed: can switch this off in the search settings (cog button, I think). Expect to have to do it again every couple of weeks though...

Re: A day without JavaScript

#10
Well, while I like what you can build with JS, I often don't like what people build. For example, npm makes it so easy to import megabytes as a dependency to your project while you might only need a few kilobytes. And some devs simply do not seem to care about that.

On the other hand, JS allows us to build great user interfaces which better to use than our old school point and click adventures we use to have. And if you do it right the performance is also ok, but it is also not so hard to fail and ruin the whole user experience by rendering the scene twice every frame ;-)

Post reply on HN