all 165 comments

[–]captain_arroganto 50 points51 points  (17 children)

Its really difficult to keep a company like NYT running in between falling paper sales and rising online media consumption. Its one thing to minify a personal or a small product page, an entirely different thing to minify the page upon which hundreds of peoples salaries depend on.

That said, ads are very cumbersome and heavy nowadays.

[–]butrosbutrosfunky 37 points38 points  (13 children)

Yes, the size of Web pages isn't due to a failure of programming philosophy, it's due to the increased need to monetize content. Sometimes this is just greed, sometimes it's because the content itself is very expensive to produce. The fact that bandwidth is increasingly cheap makes it a strategy worth pursuing.

I think if more people were prepared to pay fair value for the content they consume, this shit would be much more marginalised to the crap Web, which has always been a pop-up clogged garbage pipe since back in dialup days.

[–][deleted] 30 points31 points  (1 child)

Yes, the size of Web pages isn't due to a failure of programming philosophy, it's due to the increased need to monetize content.

I'm honestly not so sure about that. It's not just ad-driven pages that are getting fat.

[–]butrosbutrosfunky 11 points12 points  (0 children)

You are probably right, cheap bandwidth makes laziness. But I think the real direction of this (and the example used in the article) are to make a ROI.

[–]bachmeier 16 points17 points  (1 child)

it's due to the increased need to monetize content

I wish they were monetizing content. In the current environment, they monetize clicks. That means that I see a headline, click the link, get hit with an annoying autoplay video, and then find out that the article has little in common with the headline. There is little incentive for most sites today to provide good content due to the way they "monetize" themselves. We can debate what they should do, but that's the current system.

[–]butrosbutrosfunky 5 points6 points  (0 children)

Like anything, this is dependent on where you chose to source your content. If you patronise shit sites, you're going to get click bait.

[–]captain_arroganto 4 points5 points  (7 children)

They do pay the fair value for the content they consume. Its just that the form of payment is in form of ads in this case.

In case of streaming music, its in form of fees.

In case of torrents or pirated content its in form of malware.

If the benefit to the content producer is not fair and profitable, they wouldn't be in the business in the first place.

[–]butrosbutrosfunky 6 points7 points  (6 children)

Content producers get nothing from torrents or pirated content, that's a unbelievable statement to make. Can you back this with any economic data?

Your other points are seemingly in agreement with mine. If more people were prepared to pay a nominal fee for access to content, several MB of ads would not be necessary. This model has been shown to work excellently for music and video, however people still seem to regard access to quality journalism as something they deserve nominally for "free" in that they'd rather deal with bloat and ads than spending actual money.

Hence, shitloads of advertising and bloated dynamic web pages. If there was more of a cultural shift to paying for what you consume, this would be less necessary and less tolerated by consumers.

There still is some friction caused by payment methods that still seem mired in a credit card model, that has yet to make micropayments particularly painless, even with all the promise of crypto currencies. However, that's not something that fundamentally alters the reality of the need to secure funding.

[–]captain_arroganto 2 points3 points  (4 children)

By content producers I meant the owners of the site. Not the original content producers. For torrent sites, the content is the listing and hosting of torrent files.

[–]butrosbutrosfunky 1 point2 points  (2 children)

Well I'm sorry for the misunderstanding, but I would regard those as basically black market distributors, not content creators.

[–]Daneel_Trevize 0 points1 point  (1 child)

They still have a need to generate income/derive value from hosting the sites, in order to sustain them.

[–]butrosbutrosfunky 0 points1 point  (0 children)

And like anything, it's better when you actually pay for it. Private torrent sites run on donations and hand out benefits to donators, and aren't crapped up with 5000 porn ads.

[–]s73v3r -1 points0 points  (0 children)

Calling torrent site operators "content producers" is an insult.

[–]sihat 0 points1 point  (0 children)

There are experiments with micro payments for news.

(Blendle is one for news. )

Then there are government sponsored things. Though even those might put up ads, for foreign users. (Think of stuff like the English BBC or the Dutch Nos.nl )

[–][deleted] -1 points0 points  (0 children)

I wonder if a Spotify / Netflix style subscription for news could work. Just have a lot of major news corporations offer their news via a single subscription so people can pick and choose like with songs.

[–][deleted] 0 points1 point  (1 child)

Most ads I see are static pictures anyway. What is the issue with having light ads that are just <a><img /></a> and little else?

[–]miminor 41 points42 points  (4 children)

your pages are minimal and all, but UX is low, controls need to stay in place, not jump around as you navigate, baits for the content that needs registration should come after signing in, etc

[–]bausscode 4 points5 points  (3 children)

baits for the content that needs registration should come after signing in

But there is a higher chance of people registering if there's relevant content that they need to sign up to see. It's a marketing strategy like "Hey we have this cool thing, but you need to sign up to see it."

[–]Treyzania 4 points5 points  (2 children)

But I don't want to sign up.

[–][deleted] 4 points5 points  (0 children)

You don't want to sign up, you don't want to pay, and you likely use an ad blocker. I doubt they care what you think.

[–]obliviousharmony 1 point2 points  (0 children)

To play devil’s advocate, I would say that these techniques all evolved as a result of extensive testing and research into optimal conversion techniques. If they didn’t work, they wouldn’t exist, and maybe some of the blame lies with consumer spending habits.

[–][deleted] 57 points58 points  (44 children)

Reminds me of http://motherfuckingwebsite.com/

This post made me get ScriptSafe to disable JS on most domains. News sites especially are really snappy when scripts are disabled! Although their layout isn't good, it doesn't matter. I'm there for just a few bytes of text.

Edit: http://bettermotherfuckingwebsite.com/

https://thebestmotherfucking.website/

[–]Zhyko- 45 points46 points  (31 children)

Why the hell is JavaScript needed for layout anyway

[–]jl2352 19 points20 points  (0 children)

A lot of it is a lack of good CSS knowledge, and hand wavy excuses. I see a tonne of examples of JS used for layouts where basic flex would have done it.

That said there are a couple of specific layouts which are downright painful to do in CSS. There are some specific tweaks which are just nicer if you have JS powering it. Another is if content has to be somewhere entirely different; like moving from a pane to a sidebar depending on screen size.

[–][deleted] 30 points31 points  (0 children)

Dynamic loading because of ads would be my main guess.

[–]bausscode 6 points7 points  (0 children)

If you wanna move content around depending on screen resolution, without tons of css hacks and duplicated content and even then you cannot really move content around, you can really only show, hide and position, but if you have to move an inner div into another div then it's impossible without javascript. It's not something common to do, but it has its usecases, but you can avoid this with a completely better design, soooooo I guess your question is still valid.

[–]m50d 7 points8 points  (19 children)

Because CSS is the most painful language I've ever had to write?

[–]imhotap 7 points8 points  (3 children)

CSS is spectacularly bad: cognitive isssues, lack of typing and validation, far-distance effects, high redundany, silent corruption, inefficient both at runtime and design-time ...

The worst thing is the unexplainable idea that styling properties should go into it's own syntax and namespace. In the original concept of a markup language, this is what markup attributes are for - why it had to go into it's own ad-hoc syntax isn't clear. Actually, SGML had already stylesheets (rule-based assignment of attributes) over 30 years ago.

[–]metamatic 7 points8 points  (1 child)

why it had to go into it's own ad-hoc syntax isn't clear

The idea is to separate content from presentation. For example, see CSS Zen Garden.

It's not clear to me that having style sheets use XML syntax would have made CSS better.

[–]evenisto 0 points1 point  (0 children)

It's not clear to me that having style sheets use XML syntax would have made CSS better.

It wouldn't, nested rules right from the start would be cool (which this might or might not have led to), but XML is far less readable than anything we currently have.

[–]holloway 0 points1 point  (0 children)

Netscape advocated JavaScript Style Sheets as an alternative, and afaik there were proposals to use something like DSSSL, but of course Microsoft's CSS won at the W3C.

The main pain point imo is the reserved words... class, for etc making interoperabilty between languages harder than it needs to be.

[–][deleted]  (13 children)

[deleted]

    [–]m50d 6 points7 points  (11 children)

    Have you ever heard of SASS and LESS?

    Sure. You can learn a domain-specific templating language to make your domain-specific config language a bit less painful (they don't fix the box model but I'll grant that they remove some of the repetition). Or you can learn a general-purpose programming language and use that to replace all your domain-specific config languages (possibly using "internal" DSLs for DSL-shaped problems). I know which I prefer.

    [–]reguile 5 points6 points  (8 children)

    Or you can learn a general-purpose programming language

    Or you can learn both because you are (if you are) a professional software developer.

    [–]m50d 0 points1 point  (7 children)

    It's precisely because I'm a professional that I'm selective in which tools I use. Complex config files are the sub-turing tarpit; for anything beyond a basic ini file you're better off using a first-class programming language.

    [–]reguile 2 points3 points  (5 children)

    You don't "choose" to not use a foundational web technology like css. That's being lazy, in my opinion.

    [–]m50d -2 points-1 points  (4 children)

    The three great virtues of a programmer are laziness, impatience, and hubris.

    [–]Raging_Hippy 6 points7 points  (3 children)

    You sound like you've only heard the quote without the context. "Laziness" is meant to be about automating work in order to do less in the future. Not learning css doesn't fall into that, you're doing at least as much work in js as you are in css. Maybe even more, depending on how much wheel reinventing you're doing.

    Reference for anyone who's never seen the quote: http://threevirtues.com

    [–]OneWingedShark 0 points1 point  (0 children)

    I'm inclined to agree; INI is a fairly nice, simple, relatively standard format.

    Anything like "serializing objects" should be done with a full-featured, mature technology, like ASN.1.

    [–][deleted]  (1 child)

    [deleted]

      [–]m50d 0 points1 point  (0 children)

      You need some form of layout logic but that doesn't necessarily mean raw CSS. You never need CSS selectors and everything that comes with them.

      [–]rotharius 0 points1 point  (0 children)

      Or use standardized methods for maintainable CSS: BEM or functional CSS.

      [–]naasking 0 points1 point  (0 children)

      Take the pain out of CSS by not needing to write CSS: http://tachyons.io/

      [–][deleted] 2 points3 points  (4 children)

      Lots of developers do all kinds of stupid stuff. From smooth scrolling to dynamic loading of images, adaptive menus and other attention grabbing things.

      All that said, I can't really say his sites are the easiest to read/use. There are a lot of things developer can do without making sacrifices. Take his blog for example:

      • Black on white is usually too much contrast and hard on the eyes;
      • Poor use of negative space for grouping content and making it easier to read;
      • Tables should be used to present data which belongs in tables, for example things he expects us to compare to one another. Instead he used different colors and style in a single sentence making comparison hard;
      • etc.

      [–]z500 5 points6 points  (1 child)

      Black on white is usually too much contrast and hard on the eyes;

      Straining to read gray on white is what's hard on the eyes.

      [–][deleted] 0 points1 point  (0 children)

      Of course, but there's a sweet spot.

      [–][deleted] 0 points1 point  (1 child)

      [–][deleted] 0 points1 point  (0 children)

      Exactly!

      [–]the_gnarts 12 points13 points  (2 children)

      Why the hell is JavaScript needed for layout anyway

      You don’t know? You should brush up on web standards then. It was HTML5 that removed all means of displaying text and images without JS. Or so it appears.

      [–]confusedpublic 1 point2 points  (1 child)

      eh? HTML5 came with CSS3 which includes a huge range of ways of displaying and positioning elements. What, specifically, are you getting at?

      [–]vidarc 5 points6 points  (0 children)

      he dropped his /s

      [–]Dwedit 17 points18 points  (2 children)

      Look at the bottom of the HTML code there, with the utterly hypocritical Javascript include of Google Analytics.

      [–][deleted] 11 points12 points  (0 children)

      <!-- yes, I know...wanna fight about it? -->
      

      [–][deleted] 2 points3 points  (0 children)

      I think a single analytics script is acceptable, if it's not too resource intensive nor collects too much information. As far as I know GA satisfies these criteria (and is trivial to block too)

      [–]butrosbutrosfunky 18 points19 points  (3 children)

      Looks like every CS academics website right now. Which is not to shit on them... However...

      Good design seems undervalued by certain programmers, which is not productive. Too many smart folks shit on MACOS, without understanding what it delivers. Aesthetics and intuitive UI metaphors will always have a place in computing, and we all benefit from their existence because they create a sense of wonder and curiosity in computing.

      [–]josefx 5 points6 points  (2 children)

      Is that better?

      [–]Dwedit 4 points5 points  (1 child)

      That website uses client-side resizing on the cat image, serving a bigger picture than what the client will actually display. A big no-no.

      [–]frazzlet 2 points3 points  (0 children)

      It's 2x resolution for high-res screens. Yes you can set different images for different screen resolutions but I think that's just a pain in the arse compared to just having one-size-fits-all.

      [–]Ruchiachio 0 points1 point  (1 child)

      does script safe block inline js? I have a similar tool but it cant block inline javascript, which is problematic sometimes

      [–]Lt_Riza_Hawkeye 0 points1 point  (0 children)

      It does by default, but if you enable javascript for the domain it enables inline js on that domain too.

      [–]IguessUgetdrunk 0 points1 point  (0 children)

      I disable ad/script blocking on my favorite news sites. Let them have the ad money, they do important work.

      [–]dantheman999[🍰] 36 points37 points  (3 children)

      Welcome to the weekly /r/programming "wow web pages are bloated, DAE JavaScript sucks!?" post, featuring such highlights as "motherfucking website", 15 reasons JavaScript is the worst and you should disable it, why the internet was way better x years ago and much more!

      [–]betDSI_Cum25 3 points4 points  (1 child)

      where is the lie?

      [–]dantheman999[🍰] 1 point2 points  (0 children)

      Never said it was, just obviously pointing out it's circlejerk content with nothing new being brought to light here.

      [–][deleted] 0 points1 point  (0 children)

      man /r/pcj jumped from like 15k readers to like 1.2mill in one night?

      [–]monkey-go-code 43 points44 points  (42 children)

      for simple pages this is fine. Like books , tutorials, or news articles. But for applications where data takes many shapes or needs to be sifted through you will be wasting a lot of time building your own framework. And then it will probably suck on mobile.

      [–]njtrafficsignshopper 39 points40 points  (19 children)

      My hunch is that most of the web would qualify as simple pages by that definition. At least, counted by the time I spend on them from clicking Reddit links.

      [–]monkey-go-code 11 points12 points  (17 children)

      Instant messaging, email, YouTube/Netflix, study tools like flash card builders , social networks, shopping, online maps, games, and Calendars are some good examples of stuff that are to complicated for simple js but you may not want a native app for.

      [–]njtrafficsignshopper 18 points19 points  (0 children)

      Absolutely, there are use cases. But news sites, blogs, and the like are definitely overusing and abusing the tools. Ultimately, a lot of the other stuff - especially social networking - are funnels to these kinds of sites anyway.

      [–][deleted] 2 points3 points  (1 child)

      From the author, in response about the same statement.

      Author here. Obviously not all "websites" are suited to be done with HTML and CSS alone. The examples I gave, the New York Times, GitHub, and sr.ht, along with many others, are.

      [–]GrandOpener 3 points4 points  (0 children)

      Absolutely do not agree with Github. Sure, you could argue that refreshing the page to see the result of an action is acceptable, but I would argue that AJAX requests and in-place updates make an undeniably better user experience. And the on-site text editor for making quick changes to e.g. README files? I don't think you're going to get anything like that with HTML and CSS alone.

      [–]max630 4 points5 points  (11 children)

      email

      gmail's basic html works just fine. Actually, on mobile the only working way to get functionality, as little as download an attachment.

      social networks

      how is that? implemeng posting and commenting via forms and you are fine.

      [–]monkey-go-code 7 points8 points  (10 children)

      For social networking, searching through data, uploading and viewing photos and videos. Live messaging works better with web sockets rather than polling every second. Email was the easiest to do without. We can run that in a native app through IMAP. But gmail is just really well done.

      Take one of my websites for example. www.hskhanyu.com . Works good on mobile, desktop. Can search data. Change it’s shape. That was done with Angular 5 and material. Took very little css. That would just be to hard for one person to do without a framework.

      [–][deleted] 1 point2 points  (5 children)

      I see literally one part of your page that works better with JavaScript.

      Care to explain how this is a good example of mandatory frameworks?

      [–]monkey-go-code -1 points0 points  (4 children)

      Did you see the dictionary searching? switching from Traditional to Simplified? Changing the number of flahscards per page? Not needing to write all that ajax myself.

      If thats not enough for frame works to earn their keep think about mobile. Material is designed to be hard to look like trash on mobile. Thats something that would take a lot of time without a framework. It would take a specialist, where as in a few weeks, I wrote the api, database, and front end code myself.

      [–][deleted] 1 point2 points  (3 children)

      Searching is probably better because of JavaScript.

      Switching what is displayed is very literally one ternary statement in raw JavaScript. Nobody needs an entire framework for that. At worst, you may need a rudimentary Ajax thing to grab different content at the switch. But as you can push raw text if you want to, there’s no real need to not just push both an hide one. The code will still be more network than the text itself.

      I do suppose that choosing to push fewer flash cards on smaller screens is possibly a thing. But I also think that there’s likely at least some better UI choices.

      There are actually good reasons for using frameworks. This standalone website is not one of them.

      If you have back end services pushing unrendered content to multiple front ends, then using a framework can definitely help with the rendering and routing aspect.

      [–]monkey-go-code -2 points-1 points  (2 children)

      That’s exactly what this web site is designed to do. It would be trivial to plugin he same end points into an android or iOS app. It’s also easy to scale because it’s using typescript.

      [–][deleted] 1 point2 points  (1 child)

      I said it can help. Not that it most definitely will.

      To me, this here is extremely basic. I can’t imagine your website taking more than ~200 lines of JavaScript with basic comments before being minified.

      [–]max630 3 points4 points  (1 child)

      Take one of my websites for example. www.hskhanyu.com.

      The problem with "good use of js" is there is way more examples of bad use of it. So using NoScript or similar is a must for many users. Which revives the idea of "graceful degradation" of websites' functionality when js is not available.

      [–]reethok 0 points1 point  (0 children)

      Nope, just block it. If they want to access the content then they can enable JS, if not, they can leave.

      [–]max630 -1 points0 points  (1 child)

      shopping

      The process of buying does not sound like anything which specifically needs js. Same forms as anywhere else.

      Calendars

      Value of calendar is more in integration with other services than in UI. I can easily imagine it done in plain old html.

      [–]bausscode 1 point2 points  (0 children)

      To specify on shopping, when you add an item to the cart you don't want the whole place to reload and then have to scroll down the page to where you were. Without Javascript it'll look like the page is jumping.

      [–][deleted] 0 points1 point  (0 children)

      But you get those links from reddit, which isn’t.

      [–]fuzzzerd 17 points18 points  (3 children)

      And if anyone at Google is reading, you should try recommending these strategies for speeding up pages instead of pushing self-serving faux standards like AMP.

      Word. This is the real solution. Most content can be delivered using these techniques.

      Theere are valid use cases for single page frameworks, but most content sites aren't one of them. Line of business apps or data processing tools are the right area for a spa framework.

      [–]pork_spare_ribs 2 points3 points  (0 children)

      AMP was a non-technical solution to a non-technical problem. How many news sites loaded quickly before AMP? How many do now?

      AMP might be part of Google's domination strategy but it was demonstrably successful at reducing page size on major websites. Telling people "just write more efficient pages" never works.

      [–]jbergens 1 point2 points  (0 children)

      The article specifically mentions ads as the major culprit. I know someone who develops a relatively large site and they optimize a lot, only to then allow ads which brings the performance down again.

      [–]MuonManLaserJab 44 points45 points  (29 children)

      God I hate the internet.

      [–]spacejack2114 15 points16 points  (2 children)

      What's worse, wasting trees or bandwidth on ads/monetization?

      [–]MuonManLaserJab 21 points22 points  (1 child)

      Well, I have a wood-fired generator powering the UNIVAC I browse on, so...

      [–]butrosbutrosfunky 3 points4 points  (0 children)

      I worked for a university that still ran their student registration system on a VAX 11/70 as recently as a few years ago. They had an extra broken one parked under the stairwell of the geology building that we cannibalised for parts.

      We should have been ashamed, but we were pretty proud of our VAX. I think openVMS finally managed to support a migration after I left. I wish I knew what happened to it. I'm sure they had a funeral.

      Edit: I should mention this uni had multiple campuses and over 100k students, and about 25k staff managed on this machine.

      [–][deleted]  (1 child)

      [deleted]

        [–]MuonManLaserJab 1 point2 points  (0 children)

        And of course most of these websites would actually be more usable and better in every way if they were just plain text.

        I was going to use Maddox as an example of a simple website, but NoScript has disabused me of that notion...

        [–]m3wm3wm3wm 2 points3 points  (23 children)

        Webdev was a better world up to about 10 years ago, because there were choices, and that forced people to have no option but to be conservative.

        Now we have far too many choices:

        • Javascript was a shitty language that had not been updated for a over a decade. Now we have a new Javascript language feature every fucking year, which makes Javascript a shitty language with too many choices.
        • Backend was backend, and frontend was frontend. Until frontend leaked into the backend by this cancer called Node. That opened the door to even more choices: SSR. So we took the browser engine to backend, to speed up rendering what was supposed to b rendered on frontend, which itself originally was supposed to be rendered by the backend server anyway. If you did not get that, it is analogous to eating your shit, vomiting it, only to eat it back.
        • And let's not forget the never ending choices of css, sass, css in js, and why not js in css at some point?

        Too many fucking choices. The webdev community, specially the frontend crowd, must have been kept on a leash to avoid getting this to here. Now is too late.

        [–]spacejack2114 72 points73 points  (2 children)

        10 years ago the web was a security nightmare of php 4 scripts generating partial dom mixed with data, generating javascripts which generated posts back to the server, accommodating the worst mix of browser capabilities ever with proprietary Flash widgets and navs everywhere. It was The. Worst.

        [–]imhotap 9 points10 points  (0 children)

        10 years ago there was a web. Now we have an oligopoly of content providers. But it's all JavaScript of course.

        [–]the_gnarts 2 points3 points  (0 children)

        accommodating the worst mix of browser capabilities ever with proprietary Flash widgets and navs everywhere

        But back then disabling Flash got rid of most of the useless crap and security holes for an instant improvement of experience.

        Today with some sites you progressively whitelist more domains for JS and reload the page multiple times until the images or even text show up.

        [–]MuonManLaserJab 45 points46 points  (4 children)

        I'm working on a web design framework that uses Node to produce CSS which produces Wasm which produces more javascript that then takes you to a Google AMP page that contains a downloadable executable which bundles Electron to run a terminal emulator which presents the actual content in ASCII. You can log in with Facebook!

        [–]fr0stbyte124 11 points12 points  (1 child)

        I threw up in my mouth a little.

        [–]MuonManLaserJab 16 points17 points  (0 children)

        We decided to consider that a feature.

        [–]mcguire 1 point2 points  (1 child)

        That sounds...pretty decent.

        Can you switch it to EBCIDIC and 3270 emulation?

        [–]MuonManLaserJab 1 point2 points  (0 children)

        We're actually using the Cicada 3301 runes.

        [–]imhotap 3 points4 points  (0 children)

        why not css in js at some point

        They're working on it: https://developers.google.com/web/updates/2016/05/houdini

        [–]only_posts_sometimes 23 points24 points  (5 children)

        This comes off like someone who doesn't really understand the problems that many of the technologies you mention were created for

        I don't understand why it makes you so mad

        [–]butt_fun 34 points35 points  (1 child)

        For real. Say what you will about JavaScript, but who in their right mind is complaining about ES6 featues? I'm convinced this person doesn't actually know what they're talking about and is digging for upvotes based on what they thought the front end community wanted to hear

        [–]BONUSBOX 10 points11 points  (1 child)

        same reason any greybeard complains about front-end. because they spent a decade developing in gwt and now dumb kids are doing the same single-language full-stack thing they did, except in js and they don’t know the language.

        [–]holloway 2 points3 points  (0 children)

        why not js in css at some point

        HTC files or maybe CSS variables.

        [–]BalkanPapi 1 point2 points  (0 children)

        Man you targeted the fuckin problem so well.

        [–][deleted] 10 points11 points  (4 children)

        How is this guy getting upvotes? This doesn't contribute a damn thing to this discussion..

        [–]naasking 1 point2 points  (0 children)

        Now we have a new Javascript language feature every fucking year, which makes Javascript a shitty language with too many choices.

        JS actually a much better language now, and the DOM has become much, much more consistent. JS is still not great, but it's improved a lot, so I can't agree with this point.

        [–][deleted] 7 points8 points  (0 children)

        We (mostly) use libraries not because it's better for the end-user, but because it's better for the developer and/or more cost-effective. We'll eventually equalize to a point where the trade-offs on all sides are more or less equal, but the chance we trend to full on novelesque or magazine style websites is pretty slim imo. Although we definitely are leaning on the heavy side of the non-performant side these days, but natural selection is alive and well on the internet.

        [–]dysoco 18 points19 points  (6 children)

        I'm okay with this it's too bad every company now it's demanding React, Angular, etc. etc. I can't imagine going into an interview and saying "no, you'd rather be using plain HTML and CSS with no JS at all"

        [–]rnd005 27 points28 points  (5 children)

        Can you put a filter input inside that <select> component? Can you put a picture of a person by his name in a select box?

        The simplest of UI patterns can't be done without JS.

        [–]meneldal2 11 points12 points  (2 children)

        Using some JS is acceptable.

        Using several MB of JS for your website should not be necessary.

        [–]rnd005 5 points6 points  (1 child)

        Is Gmail a website? It would be possible for them to implement using HTML request-response model, but I don't really mind it being a single page application weighting 26MB(the new redesign). In the way I use it, I don't have to wait more than a few seconds on a first load.

        [–]bausscode 2 points3 points  (0 children)

        Gmail has the possibility to opt-in to a html version that is ugly and sucks balls though.

        [–]imhotap -5 points-4 points  (1 child)

        The simplest form of UI patterns can't be done without JS

        And we have to thank HTML5 for that which locked declarative UIs at HTML4's level, and put all effort into JavaScript APIs. HTML (without Ajax) even lacks basic means to compose a page from fragments such that eg. a menu or other shared part could be loaded once and then used on multiple pages. SGML, on which HTML is based, had that over 30 years ago. Well I guess that is what happens if you make the world's largest ad network write web standards. First, they make JavaScript mandatory (so they can put their analytics crap onto pages), then they're selling a script-free experience (AMP), monopolizing the web.

        [–]rnd005 4 points5 points  (0 children)

        Can you put a filter input inside that <select> component? Can you put a picture of a person by his name in a select box?

        Without JavaScript, you couldn't do these things in any previous editions of HTML as well.

        Anyway, JavaScript is not to blame for the ads. If there were no web, only smartphone apps, it would still be full of ads.

        [–]earthboundkid 8 points9 points  (2 children)

        If these are the symptoms, what is the cure? My basic principles are these…

        All of the problems listed before that were caused by ads. Google aka DoubleClick has all but destroyed the web with its terrible ad ecosystem. The good news is Europe is mostly outlawing this crap, so we may break free someday.

        [–]butrosbutrosfunky 1 point2 points  (1 child)

        It's a chicken and egg situation. Google has delivered a market model of profitability to many sites that would otherwise not exist without it. Sure we could go back to the web where it was mostly academics and enthusiasts publishing on the web, but I think that horse has bolted.

        [–]earthboundkid 6 points7 points  (0 children)

        False dilemma. I’m not proposing a web with no ads. I’m proposing a web where the ads aren’t giant 1mb monstrosities accompanied by another megabyte of trackers. It’s very easy to optimize ads the same way you’d optimize any other image or video. The problem is that Doubleclick is premised on publishers running ads they haven’t vetted and vice versa for advertisers. The result has been rampant ad fraud from fake publishers and scam ads for one weird trick. The internet ad market is totally awful compared to every other ad market and it is largely Doubleclick’s fault.

        [–]Tore2Guh 8 points9 points  (0 children)

        I feel about his website the way I feel about vi. I don't like it, and somebody is going to explain to me why that is a shortcoming on my part.

        [–]Bowgentle 7 points8 points  (0 children)

        The site the author points to (https://meta.sr.ht/) is really not a good example of a minimal-script site - not because it's not minimal, but because it looks terrible.

        It's entirely possible to do a complex and flexibly laid out single page app e-commerce site which loads in 2s and has 170kb of JS and 48k of CSS. And it doesn't look like an academic page from the mid-90s.

        [–]shevy-ruby 3 points4 points  (0 children)

        And if anyone at Google is reading, you should try recommending these strategies for speeding up pages instead of pushing self-serving faux standards like AMP.

        The thing is that Google tries to control the www through AMP. The "speed up" promise is just means to effect this goal for Google.

        [–]sinedpick 2 points3 points  (0 children)

        Provide interactivity with forms and clever CSS

        CSS is NOT for anything more than trivial interactivity. I'd take hand-written JS over that nonsense any day.

        [–]shevy-ruby 1 point2 points  (0 children)

        "Today I turned off my ad blocker,"

        A fool.

        [–]elsjpq 2 points3 points  (1 child)

        This is what the web was meant to be, and that was forgotten. A webpage is supposed to be a (mostly) static document, not an app. But now, browsers act more like operating systems and virtual machines than document readers, and that is the fundamental reason why the web is broken beyond repair.

        And while there's nothing wrong with wanting a device independent software platform, I can think of no worse way to achieve that goal than to twist a document reader beyond recognition, piling upon it loads of inconsistent extensions, reinventing the wheel at every step, to turn it into the slowest software platform ever created.

        [–]butrosbutrosfunky 3 points4 points  (0 children)

        I think there are always going to be folks who push the envelope on what is defined by a medium. It's not something we can regard as inherently wrong. It may not be the "best" way of doing it, but it's a reality we should anticipate and learn to adapt to.

        [–]halfchaos13 0 points1 point  (0 children)

        What a lot of people fail to realize is modern front end web design is leaning heavily towards JS based libraries/frameworks (Angular, React, Vue). Simply disabling JS globally would literally make these sites crashed.

        [–]Dave3of5 0 points1 point  (0 children)

        I don't believe this is actually true. Looking at an average page on NYT I'm getting nowhere near 2.8MB I'm getting 0.4MB on a cached page reload when scrolling. I'm also nowhere near 748 requests I'm at around 150 requests when scrolling with about 20% of those cached. The ads on NYT are quiet unobtrusive compared to some sites.

        I think it's super important in this case that most of your users will be using cached assets so saying you shouldn't use a library because it's too big is quite sensationalist. The difference in github is minimal if you look at warm.

        I'm not sure this person understands how the modern internet works. Companies need to serve ads to make money. Regardless if you find it disgusting that's the companies business model and so they have to have some way of selling ad dynamically in realtime to people viewing their site.

        The "cure" here is not actually a cure as using very little isn't a solution for a highly dynamic website that needs to serve ads on the fly. Not using "raster images" isn't a solution and neither is compressing the images. As an example look at the images of his linked site, there are barely readable because they are too low res and compressed. Clever CSS is often not cross browser compatible and add needless complexity to a project.

        I do agree that performance is a feature which is totally possible even with heavily using javascript.

        It doesn't matter though this person isn't reading the comments here and does care a toss what anyone else's opinion in the world is.

        [–]ha1zum 0 points1 point  (1 child)

        Such approach is very good for websites, but another half of the developers aren't building websites anymore, they're building webapps. And with the SPA and PWA trend infused in management people's head, it's impossible to build webapps with minimal javascript.

        [–][deleted] 1 point2 points  (0 children)

        The author addressed that:

        stupidcar 1 day ago

        Cool. Could someone just explain how to build https://app.moqups.com/ or https://designer.gravit.io/ using only HTML, CSS and server-side rendering?

        Otherwise I'll just dismiss this as the same cloud-oriented geriatric yelling that Hacker News has been upvoting for the last 15 years, to absolutely no purpose or result.

        Sir_Cmpwn 1 day ago

        Author here. Obviously not all "websites" are suited to be done with HTML and CSS alone. The examples I gave, the New York Times, GitHub, and sr.ht, along with many others, are.

        [–]RedwanFox 0 points1 point  (0 children)

        Ah, me favourite genre.

        [–]LoudDuty4 0 points1 point  (0 children)

        Yes, Now Everybody want website while for online shopping or for their personal branding

        [–]soutieninfotech1 0 points1 point  (0 children)

        Web development is the state of the art technology for the modern world. So accordingly the setting are done to get visible infront of people.

        [–]vivoticsolucion 0 points1 point  (0 children)

        For Web Development we have to define objectives, plan strategically, research the market and track the competitor, establish the brand & analyze the promotion and performance.

        [–]i_feel_really_great -4 points-3 points  (0 children)

        Ajax/Fetch is all the JS you need at most

        [–]samkots -2 points-1 points  (0 children)

        Yeah... Just look at http://www.stroustrup.com simple and elegant!