Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Wednesday September 05 2018, @04:57PM   Printer-friendly
from the less-is-more dept.

Programmer Drew DeVault writes a blog post about conservative web development after poking at a few popular sites and finding that only 8% of the data downloaded among the megabytes of advertisements, scripts, and third-party scripts is actually related to content. This represents several usability problems. After walking through some of the more problematic symptoms he proposes several steps which can remediate the state of the web.

Today I turned off my ad blocker, enabled JavaScript, opened my network monitor, and clicked the first link on Hacker News - a New York Times article. It started by downloading a megabyte of data as it rendered the page over the course of eight full seconds. The page opens with an advertisement 281 pixels tall, placed before even the title of the article. As I scrolled down, more and more requests were made, downloading a total of 2.8 MB of data with 748 HTTP requests. An article was weaved between a grand total of 1419 vertical pixels of ad space, greater than the vertical resolution of my display. Another 153-pixel ad is shown at the bottom, after the article. Four of the ads were identical.

Aside: Opponents to javascript are often wrongfully framed as Luddites. However, I invite readers to connect the dots; see:
Exploiting Speculative Execution (Meltdown/Spectre) via JavaScript
Web cache poisoning just got real: How to fling evil code at victims
Rowhammer.js Is the Most Ingenious Hack I've Ever Seen and
Oh, great, now there's a SECOND remote Rowhammer exploit

[Ed note: SoylentNews is designed to use no Javascript for normal user interactions. (There are a few staff-accessible pages requiring it, such as the Story Editing page.) I don't know of anyone on staff who would seriously consider changing that. When this site was initially rolling out, we actually tested to make sure it would work on a text-only browser (Lynx) and even Mosaic! So, please enjoy your light-weight, performant web pages here!]

[TMB note: Except the "collapse/expand this whole damned thread" button.]


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, Interesting) by DarkMorph on Wednesday September 05 2018, @09:52PM (1 child)

    by DarkMorph (674) on Wednesday September 05 2018, @09:52PM (#730973)
    Let's continue on that line of thinking. The benign usage of JS to update content on the page to avoid page reloads and to conserve a lot of bandwidth.

    It always bothered me that most sites will have commonly consistent elements, like some kind of navigation, header, footer, those sorts of things, and for every (well, most) pages you visit for a site designed this way, you continue to be bombarded with the same collection of markup each page load. Surely there's a better way? Assets like JS or CSS are cached, but not fragments of HTML. Wouldn't it make more sense to keep the user on the same page, loading the common HTML just once, and let JS take care of going from page to page? Make an async call, get data in a JSON, run some logic to present this data on the fly... Yeah, it would completely trash the back/forward buttons since asynchrnous requests don't count as browsing history...

    Oh, wait. There is a way to do this (at least partially, anyway) -- but for some reason the Internet decided it was bad design to use them.

    They're called frames.

    Of course, frames were awfully limiting if used, but it was the only non-JS/AJAX solution to the idea described and rather than evolving, it was left behind in the dust. Unfortunately if you try to get creative with iframes, you will most likely still resort to JS to make the whole thing work.
    Starting Score:    1  point
    Moderation   +2  
       Interesting=2, Total=2
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 3, Informative) by tibman on Thursday September 06 2018, @03:56AM

    by tibman (134) Subscriber Badge on Thursday September 06 2018, @03:56AM (#731148)

    Some js frameworks embed html snippets inside them which makes large portions of the site cacheable by the client browser.

    --
    SN won't survive on lurkers alone. Write comments.