Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 15 submissions in the queue.
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: 2) by deimtee on Wednesday September 05 2018, @09:25PM (4 children)

    by deimtee (3272) on Wednesday September 05 2018, @09:25PM (#730963) Journal

    Not a web programmer, so this is a serious question, but wouldn't adding javascript modding code to every comment pretty much negate the reloading bandwidth argument?
    And you're adding it to every page for everyone, not just those modding that page.

    --
    If you cough while drinking cheap red wine it really cleans out your sinuses.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 3, Informative) by tibman on Thursday September 06 2018, @03:52AM (1 child)

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

    The js function would only be defined once on the page. Each Moderate button would just call the same defined function. You could slim the page with js by removing the moderate's combo box from every comment (15 select options * number of comments is a lot). Then when clicking moderate you'd get a small modal (or something) where you can select the rating and submit or cancel.

    --
    SN won't survive on lurkers alone. Write comments.
    • (Score: 2) by fyngyrz on Thursday September 06 2018, @05:44AM

      by fyngyrz (6567) on Thursday September 06 2018, @05:44AM (#731179) Journal

      You could slim the page with js by removing the moderate's combo box from every comment

      Or, you could have the javascript dynamically create the drop-downs on the client side as the page is rendered. They could look the same, but work better, take much less bandwidth than embedded, sent-over-the-net drop-downs, not require page reloads at all, and be able to display the current mod point count. All you need is an element with an id per comment, probably just the comment number, or very close to that. Very efficient. Same goes for the visible mod state of the comment itself: easily done, very efficient.

  • (Score: 4, Informative) by fyngyrz on Thursday September 06 2018, @05:33AM (1 child)

    by fyngyrz (6567) on Thursday September 06 2018, @05:33AM (#731177) Journal

    Not a web programmer, so this is a serious question, but wouldn't adding javascript modding code to every comment pretty much negate the reloading bandwidth argument?

    No. It can be done very efficiently.

    • (Score: 0) by Anonymous Coward on Thursday September 06 2018, @07:53PM

      by Anonymous Coward on Thursday September 06 2018, @07:53PM (#731486)

      there's a app for that ... kidding, no, srsly!