Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday September 16 2019, @05:00PM   Printer-friendly
from the things-expand-to-exceed-the-space-provided dept.

https://danluu.com/web-bloat/

A couple years ago, I took a road trip from Wisconsin to Washington and mostly stayed in rural hotels on the way. I expected the internet in rural areas too sparse to have cable internet to be slow, but I was still surprised that a large fraction of the web was inaccessible. Some blogs with lightweight styling were readable, as were pages by academics who hadn't updated the styling on their website since 1995. But very few commercial websites were usable (other than Google). When I measured my connection, I found that the bandwidth was roughly comparable to what I got with a 56k modem in the 90s. The latency and packetloss were significantly worse than the average day on dialup: latency varied between 500ms and 1000ms and packetloss varied between 1% and 10%. Those numbers are comparable to what I'd see on dialup on a bad day.

Despite my connection being only a bit worse than it was in the 90s, the vast majority of the web wouldn't load. Why shouldn't the web work with dialup or a dialup-like connection? It would be one thing if I tried to watch youtube and read pinterest. It's hard to serve videos and images without bandwidth. But my online interests are quite boring from a media standpoint. Pretty much everything I consume online is plain text, even if it happens to be styled with images and fancy javascript. In fact, I recently tried using w3m (a terminal-based web browser that, by default, doesn't support css, javascript, or even images) for a week and it turns out there are only two websites I regularly visit that don't really work in w3m (twitter and zulip, both fundamentally text based sites, at least as I use them)[1].

More recently, I was reminded of how poorly the web works for people on slow connections when I tried to read a joelonsoftware post while using a flaky mobile connection. The HTML loaded but either one of the five CSS requests or one of the thirteen javascript requests timed out, leaving me with a broken page. Instead of seeing the article, I saw three entire pages of sidebar, menu, and ads before getting to the title because the page required some kind of layout modification to display reasonably. Pages are often designed so that they're hard or impossible to read if some dependency fails to load. On a slow connection, it's quite common for at least one depedency to fail. After refreshing the page twice, the page loaded as it was supposed to and I was able to read the blog post, a fairly compelling post on eliminating dependencies.

[1] excluding internal Microsoft stuff that's required for work. Many of the sites are IE only and don't even work in edge. I didn't try those sites in w3m but I doubt they'd work! In fact, I doubt that even half of the non-IE specific internal sites would work in w3m.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 4, Touché) by Pino P on Monday September 16 2019, @08:16PM (5 children)

    by Pino P (4721) on Monday September 16 2019, @08:16PM (#894792) Journal

    It is a common misconception that JavaScript is required for any sort of real application, it is not. By using a reasonable amount of CSS and some applied HTML, a huge amount of functionality can be achieved without a single line of JS.

    "Huge" doesn't necessarily imply "comprehensive." One counterexample is a web-based whiteboard application. Say you want to let the user draw curves on a canvas. With JavaScript, you can have the user drag over the path of the curve. With HTML and CSS without JavaScript, you instead have to use a server-side image map and require the user to click at every point along the curve, causing a form submission and page reload after each click, and then click somewhere else to end the curve. Another is making nontrivial functionality available while the user's device is offline.

    Even a pop-up calendar to choose dates from could be done in pure HTML/CSS

    How is that done? The <input type="date"> element doesn't work on all browsers, particularly not Internet Explorer for Windows 7 and Windows 8.1 or Safari for macOS. Even current Firefox doesn't support type="datetime-local", type="month", or type="week". Or do you have it reload the page each time the user navigates to the previous or next month or the previous or next year?

    Starting Score:    1  point
    Moderation   +2  
       Interesting=1, Touché=1, Total=2
    Extra 'Touché' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 0) by Anonymous Coward on Monday September 16 2019, @09:03PM (2 children)

    by Anonymous Coward on Monday September 16 2019, @09:03PM (#894812)

    You have to remember that clicking the right thing interacts with the DOM. So if you get creative with the hiding and showing of elements, then you can do a full blown calendar. Between HTML, CSS, and user interaction, you can code any program you'd like into CSS. The real question is how complicated you'd like it to be, especially with other choices available. A calendar isn't that hard in its basic form, really its just how complex you want to make it.

    • (Score: 2) by Pino P on Tuesday September 17 2019, @12:46AM (1 child)

      by Pino P (4721) on Tuesday September 17 2019, @12:46AM (#894922) Journal

      So if you get creative with the hiding and showing of elements, then you can do a full blown calendar.

      I'd like to see a demo of this covering multiple years without needing to reload the page.

      • (Score: 0) by Anonymous Coward on Tuesday September 17 2019, @04:47AM

        by Anonymous Coward on Tuesday September 17 2019, @04:47AM (#894997)

        Uhh, just stuff more elements in there? All the text can be labels and all the dates radios, then affect visibility based on year and month selection. Yes, it will be unwieldy, very unwieldy, but that doesn't mean impossible.

        After all, you could code a browser or OS in Brainfuck; that doesn't mean it will be readable or particularly fun to do, but it is possible. Same goes for HTML with CSS, especially CSS3: just because there may be a better language for your project, doesn't mean other languages can't do the same thing.

  • (Score: 0) by Anonymous Coward on Tuesday September 17 2019, @12:06AM (1 child)

    by Anonymous Coward on Tuesday September 17 2019, @12:06AM (#894902)

    If you look at the examples of pure HTML/CSS calendars, they use really sophisticated CSS tricks. e.g. https://codemyui.com/pure-css-calendar-widget/ [codemyui.com]

    But the important point is that the number of websites that actually need Javascript is incredibly small. Shops, blogs, discussion boards of all kinds, movie sites, music sites, news sites - they don't need it. Sure it would be awkward to implement something like Google Docs or Etherpad in pure HTML and CSS - if nothing else, you lose the autosave feature. So that's an exception. But it's a rare one.

    • (Score: 2) by Pino P on Tuesday September 17 2019, @01:00AM

      by Pino P (4721) on Tuesday September 17 2019, @01:00AM (#894926) Journal

      Shops, blogs, discussion boards of all kinds, movie sites, music sites, news sites - they don't need it.

      As for shops, the last time I wrote mark-up for a brand new shop site was a decade or so ago, when people were complaining at me for not supporting IE 7.

      As for discussion boards, I've used discussion boards without script (such as phpBB) and discussion boards with script (such as Discourse), and I'm curious about how to implement some features that Discourse has and phpBB lacks without script. How does a discussion board notify the user of a reply that someone else has posted since the last page load? How does a discussion board offer live preview of the translation from BBCode or Markdown to HTML, or would the user have to submit the form using the Preview button to update the preview? How does a discussion board let a user track how far into a thread the user has scrolled? I guess that's sort of like the autosave feature of Google Docs though.

      As for movie sites, do you mean a review site or an actual subscription video on demand service?