News for hackers. Stuff that matters.
Re:The Cost of JavaScript in 2019 by bromuro on Sunday June 30, 2019 @06:39PM (#20321019)
How are Reddit’s marketing choices related to this article?
Re:The Cost of JavaScript in 2019 by nine_k on Sunday June 30, 2019 @08:06PM (#20321415)
Skimmable design → shorter time and smaller space for ads → less ad revenue.

I wish Reddit ran something like Youtube Premium, a paid ad-free experience with actually comfortable layout.

Re:The Cost of JavaScript in 2019 by TheAceOfHearts on Sunday June 30, 2019 @11:17PM (#20322206)
You can buy reddit premium so you no longer get ads. It's absolutely bullshit how much stuff they still track, though.
Re:The Cost of JavaScript in 2019 by alyandon on Monday July 01, 2019 @01:47PM (#20327859)
They lost me as a premium subscriber because they no longer offer a discounted annual subscription plan and instead expect me to pay $6/mo ($72/yr) for ad-free access to a site that is comprised of user-generated content. That's more than the subscription price of some actual news sites.
Re:The Cost of JavaScript in 2019 by Arbalest on Sunday June 30, 2019 @08:17PM (#20321469)
If something is going to be ad free, it had better also be tracking free.
Re:The Cost of JavaScript in 2019 by jmkni on Monday July 01, 2019 @08:37AM (#20324636)
The article uses Reddit's Javascript execution times as an example
Re:The Cost of JavaScript in 2019 by NullPrefix on Sunday June 30, 2019 @07:23PM (#20321236)
JavaScript. They use too much of it.
Re:The Cost of JavaScript in 2019 by threeseed on Sunday June 30, 2019 @07:30PM (#20321268)
Javascript has nothing to do with those decisions. It is purely design.
Re:The Cost of JavaScript in 2019 by AlchemistCamp on Sunday June 30, 2019 @07:56PM (#20321368)
> Javascript has nothing to do with those decisions. It is purely design.

How do you implement infinite scroll without JavaScript?

The theme tying all their choices together is costs they're willing to inflict upon their users. Bloated JS payloads are simply one example.

Re:The Cost of JavaScript in 2019 by NullPrefix on Sunday June 30, 2019 @08:36PM (#20321531)
> How do you implement infinite scroll without JavaScript?

Technically it's possible.

Render the website server side as an image. Chrome 75+ supports native lazy loading of images, so a series of them stacked vertically is needed. Each image represents a new page, scroll through them to navigate. Click detection can be done with a <map> tag.

Re:The Cost of JavaScript in 2019 by furyofantares on Sunday June 30, 2019 @09:27PM (#20321759)
I think you can also just keep sending html. Send a page with page2.png at the bottom and keep the connection open. This is a sentinel image to detect scrolling — when page2.png is requested, use this as a command to tell the server to start sending html for page 2 on the original connection, which would have page3.png at the bottom.
Re:The Cost of JavaScript in 2019 by NullPrefix on Monday July 01, 2019 @06:10AM (#20323931)
This is even simpler. Forgot that HTML can be executed while loading.
Re:The Cost of JavaScript in 2019 by orange8 on Sunday June 30, 2019 @09:41PM (#20321816)
JavaScript is now a marketing choice? Wow!
Re:The Cost of JavaScript in 2019 by NullPrefix on Monday July 01, 2019 @04:59AM (#20323599)
Can you even?