How JavaScript Overuse Ruined the Web
-
[email protected]replied to [email protected] last edited by
Great now nothing works đ«
-
[email protected]replied to [email protected] last edited by
How current web developers no longer knowing what graceful degradation is ruining the web
-
[email protected]replied to [email protected] last edited by
Has saved my life. I find myself disabling it for an entire tab several times per day to do things like make a purchase or log in, but I'd still rather that than not have it on the rest of the sites.
-
[email protected]replied to [email protected] last edited by
I like NoScript but I miss the old XUL version of NoScript.
-
[email protected]replied to [email protected] last edited by
I mean, this post makes no valid argument against JavaScript, thereâs no benchmarks or anything aside from an opinion.
I donât personally like webdev and donât like to code in JavaScript, but there are good and bad web applications out there, just like any software.
A single page can send out hundreds or even thousands of API requests just to load, eating up CPU and RAM.
The author seems to know the real problem, so I donât know why theyâre blaming it on JavaScript.
-
[email protected]replied to [email protected] last edited by
Oh the author is here. Thank you for the article.
Here are some of my thoughts of some of your points as professional web developer for startups to some of the biggest companies in the world.
Your first point of developers getting dependent on a framework or library doesn't really matter. Look at the average developer's resume with 6 years of experience. They have a lot of things listed because this is what the culture is. We have to learn or miss the opportunity working for a company that uses React rather than Angular.
Besides a professional setting, learning the new hip thing and talking about why it sucks, is programming culture and human nature.
I think this topic can be its own article especially since any contribution to open source even if it from corpos, is not bad to me but moving on.
what I am going to write next is what good web architects do. I am not saying they all do this.
Web architects look at stats of their current users or target users. They have to find a balance of server performance and user experience. Some even have a list of old devices just to test out the results to make a decision on what devices should be excluded.
You showed a video of old tech using the internet now. Some of those devices are less powerful than Raspberry Pis now. Those devices aren't even meant to handle a flat high res image. Also this is rare. Should a company spend thousand of dollars for every unique User Agent they get? No, especially since those are easily spoofed.
You are right about some sites slowing down because of JS but a lot of those, like on your own website which uses a lot of Google code, use code to stream a video in tiny bits. It makes the experience of the user a lot better. It takes a lot of logic to predict how many chunks video a user will use at a given time. I definitely wouldn't wait for a 50 mb video to stutter and load on website.
Other examples like infinite scrolling aka doom scrolling. Social media use lazy loading for images an videos. Try shoving hundreds videos and high res images with sound on a page. It would be horrendous for the user. People would log off. Say what you want about doom scrolling, but it does its job keeping users on the page.
If you want to blame Javascript, you should also blame browsers since they run the code. Firefox is at version 135. Version 1 was less than 9 mb. Version 25 is at 45 mb. Version 50 is at 82 mb. Version 100 is at 121 mb. Version 135 is at 151 mb. You want to look at slow downs, make sure you have enough RAM is run the apps you are using.
I enjoy this topic and would enjoy what you think about what I wrote. Again, than you for posting.
-
[email protected]replied to [email protected] last edited by
Only if what they're saying is bigoted horseshit.
-
[email protected]replied to [email protected] last edited by
You're welcome.
Give a hoot! Read a book!
-
[email protected]replied to [email protected] last edited by
Yeah even if you do that you can at least see the huge list of crazy scripts any given site is running. News sites are just amazing how they throw the kitchen sink at any visitors.
-
[email protected]replied to [email protected] last edited by
It is pretty great. We use it throughout PieFed if you're interested in a working example.
-
[email protected]replied to [email protected] last edited by
Because only JS is able to do that. Everything else is just a dependency tree.
-
[email protected]replied to [email protected] last edited by
That's not necessarily special to JS. It's special to client-side code. A mobile app writing in swift could do this. A cli tool written in any language could do this.
This isn't an argument against JS, it's an argument against misuse of client resources.
-
[email protected]replied to [email protected] last edited by
edited my comment to include the excruciatingly obvious assumption.
-
[email protected]replied to [email protected] last edited by
And desktop âappsâ
Half of them are just fancy electron javascript websites
-
[email protected]replied to [email protected] last edited by
Thanks! You're right, I should have given some examples like reddit.com is too slow on low end hardware, and how amazon.com loads faster than aliexpress.com for not relying too much on JavaScript. But I thought anyone could 'sense' which website has more javascript, but I was wrong after seeing some comments.
-
[email protected]replied to [email protected] last edited by
Thanks for your comment. I agree with some of your points, but I really don't understand why we should use JS frameworks for everything and render pages on the clientâs device. I'm not against JavaScript, but no website should be made entirely of it.
A few years ago, I came across a Chinese e-commerce site where the product page falsely displayed an "out of stock" message until the website fully loaded. Imagine how many people left the page, thinking the product wasnât available. This issue wouldn't exist with server-side rendering.
Regarding companies that prioritize users with newer devices, this approach may not be economically beneficial and feels deceptive to users. If they donât want users with older devices, they should clearly state it on their website by checking the user agent. For example, Amazon.com works even without JavaScript and runs smoothly on all devices. Any company serious about its profits should prioritize user experience, and making a webpage lightweight is one of the best ways to achieve that. It seems like these JS frameworks and their modules aren't really about improving user experience. What's even more concerning is that many newcomers to programming rely on these frameworks without understanding basic HTML or JavaScript.
There are many older people who still use their old laptops, and buying newer models makes it harder for them to adapt. Additionally, discarding older devices increases e-waste. This makes the behavior of big tech companies seem hypocriticalâlike Apple, which stopped including chargers with new iPhones while claiming to be environmentally friendly.
Back in 2011, we could use YouTube on our laptops without any issues. So why not make older versions available for older devices? I understand that companies want to block bots, but if thatâs the goal, why allow old device user agents to access the site in the first place? If they assume all older devices are potential bots but still want users from those devices, why not provide an older frontend for signed-in users?
I'm sorry for the rant, but this is how I feel about modern web development.
-
[email protected]replied to [email protected] last edited by
So websites are all made with these frameworks for three reasons. The first one is, it's suppose to save an server cost. If a server can send parts of code and data at a time, it should be faster. Unfortunately bad web architects do not benchmarks these things. More server calls means more headers for the same amount of data. Web developers, for several reasons sometimes out of their control, do not handle errors properly like in the Chinese e-commerce site you mentioned. So yes, you are correct, it does suck and some pages would be better off as a flat page.
The second reason is culture. AJAX first started in the 90s when users were still on 56k modems. We needed pages to load faster or else the user thought it was dead or just too annoying to stay. So this became the culture. We are no longer mimicking paper, we are creating web apps, or programs. This stays with the culture now. I've seen single page websites do it where I actually think it's detrimental.
The third reason user experience. This is in two parts which can be consider the same. The first is it's not a familiar site, users want the app experience on a website or else they leave. The second which is the nearly same is if the page does not refresh, you keep the attention of the user for a lot longer. It's like reading a really good book but there are no page turns or chapters. In social media, this is support important. eCommerce, adding items without a refresh is really important or else they might change their mind.
As for profits for users of a website, the algorithm should be something like this:
if( profitsFromOldDevices > (developmentTime+resources) ) startDevelopment();
Most of the time, this is false. Designers and developers and project managers take up a lot of money. People on really old devices are less likely to buy things. eCommerce sites know this, and advertisers know this.
When I say older devices, I meant over 2 decades old. The latest Firefox can still be installed in Android 5, which came out over a decade ago.
As for e-waste, I am not an expert on that but seeing how much electricity a Pentium 3 desktop can take, a $200 dollar smart phone can save the person money very quickly.
As for Apple, they are greenwashers but they probably have the best recycling program out of all the top hardware manufacturers. I'm sure companies like the Fairphone are leagues better though.
As for YouTube, I'm going to guess it's going run decently if you have a fairly recent browser. If you have Javascript turned off, Google can't get much info off the user. So this is their way of forcing updating.
You don't need to apologize about ranting. Have you seen how long my post? This is your post. Do as you wish. Have fun.
-
[email protected]replied to [email protected] last edited by
conservatives think someone who talks a lot with convictions is right
-
[email protected]replied to [email protected] last edited by
I constantly have to switch back and forth between turning javascript on and off to read articles. Those endless popups begging for my email address and google amp are also ruining the experience.
-
[email protected]replied to [email protected] last edited by
Nothing like having a check box suddenly move because an ad finally resolved and I end up clicking on the damn ad instead