TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Maybe we could tone down the JavaScript

48 pointsby _frogabout 9 years ago

8 comments

Pxtlabout 9 years ago
The Twitter page is a perfect example of why we use JavaScript for this stuff: because full-page loads just to hide a div is a shitty user experience. Scroll positions jump around, you&#x27;ve made a client-side action into a server one, etc.<p>The whole of html is full of these. Let&#x27;s be blunt: it&#x27;s a terrible platform, just as JavaScript&#x27;s DOM API is terrible. Everything about the web is bad, but we make it good thanks to the combined might of the computing industry.<p>JavaScript&#x27;s a mediocre language being used to pave over the weaknesses of a layout engine that can&#x27;t centre things vertically and can&#x27;t navigate without slow server interactions unless you want to confuse the user with one long page full of #anchors.
评论 #11237627 未加载
mattkahlabout 9 years ago
The &quot;You name a critical .js bundle something related to ads&quot; point is something toward which I&#x27;m particularly unsympathetic. The fact that most ad blockers (a) are whitelist-based and (b) contain blunt-edge&#x2F;naive implementations leads me to believe that false positives are the problem of the ad blocker developer and ad blocker user, not the developer of the website.<p>If Joe or Jane developer of Acme Demolition Inc. names a Javascript file `ad_main.js`, the burden of resolving the my-ad-blocker-is-blocking-this-file problem is not on them.<p>This is why I&#x27;ve yet to find an ad blocker that I would recommend to anyone without web development knowledge.
评论 #11240511 未加载
评论 #11242550 未加载
z3t4about 9 years ago
I think the root of the problem is that browser vendors break stuff all the time. A new browser comes out and now breaks your ten year old web page ... Then the web dev team says <i>fuck it</i> we&#x27;ll only support Firefox and Chromium, and start using features that only works on those browsers.<p>Ten years ago, web dev was all about getting your page to work on all platforms. But today we have hundreds of possible combinations of OS x Browser x Extensions, so it&#x27;s just impossible.<p>I try to only use browser features that are three years old and &quot;standard&quot;. But not even that works.<p>Phone&#x2F;Ipad browsers are the biggest offenders of breaking stuff.
hhsnopekabout 9 years ago
You have some valid points about how we use javascript for many parts of our web pages that don&#x27;t need javascript. I would love for the web to be fully accessible without javascript, but we have to remember that there are a small percentage of people currently using the web without javascript. Im sure twitter has their reasons for using javascript for the simple tasks that are solvable without the assistance of javascript. I would imagine that it wouldnt be cost efficient, if nothing else, not a top priority to make their site accessible without javascript due to the small user base that doesn&#x27;t use javascript.
评论 #11240569 未加载
PhilWrightabout 9 years ago
Given that Twitter is massively successful and used by millions everyday I don&#x27;t think it is a good target for complaining about slow loading times and poor performing JavaScript. Often in business &#x27;good enough&#x27; really is good enough. Gold plating code is something many developers (including myself) make the mistake of trying to do all the time. But the difference between &#x27;good enough&#x27; and gold plating is often not worthwhile for the business.
marssaxmanabout 9 years ago
OH GOD YES THIS PLEASE.
edoceoabout 9 years ago
I&#x27;m curious about two things.<p>A) What search hotkey to use if not &#x27;&#x2F;&#x27;<p>B) Why does your JS load slow? Did you fix that part?<p>I build web-apps and try to think &quot;JS second&quot;. I&#x27;ve noticed that my customers like fast loading, consistent pages. These &quot;magpie&quot; like decisions harm the customer experience.
szatkusabout 9 years ago
The issues in the article are very similar to advices in some old book (from &quot;yay, AJAX&quot;-era) about JS I read in the past. Looks like not too many people took them to heart.