News for hackers. Stuff that matters.
Re:The specification for native image lazy-loading is merged... by stevenwliao on Wednesday February 12, 2020 @10:55PM (#22315208)
I want a browser that can predict when I'll have patchy Internet, loading and prefetching as much as possible right before.
Re:The specification for native image lazy-loading is merged... by taeric on Wednesday February 12, 2020 @11:41PM (#22315382)
I want pages that can load in less space. When most of my Kindle books download faster than most web pages, there is a serious problem.
Re:The specification for native image lazy-loading is merged... by ksec on Thursday February 13, 2020 @04:36PM (#22321663)
The problem are mostly with images and javascript.

That is why I wish the next generation image format to push the quality and size ratio. I think JPEG XL currently has the best chances at succeeding Jpeg.

We should have faster Internet (5G and Fibre ) for everyone, and better Image compression for everyone. Hopefully in 5 to 10 years times this problem will be a thing of the past. Assuming we dont bloat every website into WebApps that tries to download 10MB before it even load.

Re:The specification for native image lazy-loading is merged... by edmundsauto on Wednesday February 12, 2020 @11:54PM (#22315416)
No there's not. Web bloat is a problem, but it's not useful to compare media-rich audio-video capable applications with the lightly formatted, text-only, Kindle book format.
Re:The specification for native image lazy-loading is merged... by taeric on Thursday February 13, 2020 @01:20AM (#22315713)
I'm comparing content to content. Yes, some is media rich, but if I want media heavy, I'm likely using Netflix/Youtube or similar anyway. If I'm using a web page, I actually actively don't want media heavy content.

And you can get graphic novels on Kindle nowadays. To pretend it is just text is to undersell the formats now. Could I claim they are bloating? Certainly. Still have a long way to go before they reach current web browser bloat. Which only seems to be marching on. With no signs of restraint on what to pursue.

Re:The specification for native image lazy-loading is merged... by egypturnash on Thursday February 13, 2020 @12:13AM (#22315473)
It’s also not useful for a web page you’re visiting for a few tens of kilobytes of text and a few images to be a media-rich audio-video capable application full of trackers and ads-that-might-be-malware.
Re:The specification for native image lazy-loading is merged... by Kaiyou on Thursday February 13, 2020 @08:50AM (#22317679)
Well, in my book webpages are there to display mainly text and maybe an image. So the comparison seems useful to me.
Re:The specification for native image lazy-loading is merged... by onion2k on Thursday February 13, 2020 @01:35AM (#22315783)
Google says the average size of a Kindle book is 2.6Mb. Web pages are often bad but they're not that bad. If you regularly find Kindle books download faster than webpages I suggest you talk to your ISP.
Re:The specification for native image lazy-loading is merged... by bzbarsky on Thursday February 13, 2020 @03:07AM (#22316115)
Web pages are in fact that bad. Testing just now:

* https://www.cnn.com/ is 1.3MB of data.

* https://www.nytimes.com. is 5MB of data.

* https://www.reddit.com/ is 6MB of data.

* https://www.google.com/ is 400KB of data.

* https://www.facebook.com/ (not logged in) is 2MB of data

* https://twitter.com/home/ is 1-3MB of data depending on the ads it decides to show.

Those are all on-the-wire sizes, so after gzip compression and whatnot.

Re:The specification for native image lazy-loading is merged... by onion2k on Thursday February 13, 2020 @03:30AM (#22316201)
You've picked some very heavy websites, and only two (or three, depending on Twitter) of your six examples are over the 2.6Mb threshold, but fair enough. Popular sites tend to be full of images, and images are usually quite big.

However, this is good, because those are great examples of how browser lazy loading is going to help. When I loaded Reddit it pulled down 7Mb of data, but more than 5Mb was images. Looking at the content above the fold my browser downloaded about 4.5Mb that it doesn't need until I scroll. This change to the HTML spec will get all those sites first load below the average size of a Kindle book. Awesome.

Re:The specification for native image lazy-loading is merged... by pedrocr on Thursday February 13, 2020 @04:15AM (#22316366)
All the examples are indeed over 2.6Mb as that's only 325kB. You probably mean 2.6MB instead but since you're using Mb consistently and the discussion is about transfer sizes I'm not sure.
Re:The specification for native image lazy-loading is merged... by onion2k on Thursday February 13, 2020 @04:23AM (#22316406)
Re:The specification for native image lazy-loading is merged... by pedrocr on Thursday February 13, 2020 @07:37AM (#22317228)
If you felt mistreated I'm sorry. But it was a genuine question.
Re:The specification for native image lazy-loading is merged... by onion2k on Thursday February 13, 2020 @08:31AM (#22317551)
Re:The specification for native image lazy-loading is merged... by taeric on Thursday February 13, 2020 @02:15AM (#22315938)
My Kindle books download in a few seconds. And then they are loaded completely and I can jump around in them rather well now. Properly linked books even let me jump from exercises to answers and back rapidly.

And there is some irony that I am likely tracked heavily on what I've read. Certainly on what I note. So it isn't like I'm clamoring for no scripts. Just find it odd that the push for web applications has destroyed the use of web pages.

Re:The specification for native image lazy-loading is merged... by vnorilo on Thursday February 13, 2020 @02:07AM (#22315911)
Websites make gazillion requests and run a bunch of javascript that is in their (not necessarily your) interest. Download size is not the only driver for slowness.
Re:The specification for native image lazy-loading is merged... by onion2k on Thursday February 13, 2020 @02:19AM (#22315949)
The majority of those requests aren't blocking though, and nor is the JS code when it's parsed and run, so it won't have much of an impact on the parent's perception of how long it takes to load a page. There will be exceptions on sites that have been poorly made but those are unusual these days. If you sit with devtool's Network tab open you'll see a ton of stuff going on, but most of the bad stuff is after the page has rendered and become interactive.

Web apps are a different story because they often load a couple of meg of JS before anything happens, but so long as things are being cached correctly that's only a problem occasionally.

Re:The specification for native image lazy-loading is merged... by baddox on Wednesday February 12, 2020 @11:55PM (#22315418)
Surely browsers could already do that without a lazy loading spec. I mean, I’m pretty sure browsers already queue requests so that if you load a page with 10,000 img tags it probably won’t do 10,000 simultaneous requests.
Re:The specification for native image lazy-loading is merged... by scosman on Thursday February 13, 2020 @03:18AM (#22316158)
Not simultaneous, but it does queue them with some parallelism (6 request for chrome IIRC).

Page basically dies; any Ajax requests are at the back of the queue. Scroll halfway down that page, you'll be waiting 5 mins for the images in viewport to load since they are processed in order. You can roll your own lazy load, but it's a pain and often done poorly. A good browser implementation would be great for most pages (but 10k+ might still require custom work).