top | item 22907644

The irony of Apple homepage and Safari WebP support

72 points| v3nom | 6 years ago |mobilerank.co | reply

72 comments

order
[+] jws|6 years ago|reply
That is to save 146KB on one image an 99KB on another, to save 2 seconds you'd have to using a 1mbps connection.

The first random internet article I pulled for real world cellular speeds suggests even unwired, people are getting 30mbps so that changes the article to:

Apple could load 66ms faster by adopting WebP

… but these are cached resources, so maybe…

Apple could perform the initial load 66ms faster by adopting WebP

… would be better.

Looking at the assets needed for an initial load, the fonts alone weigh in at about twice those images, so it probably wouldn't be noticeable.

[+] xrisk|6 years ago|reply
1) “real world” cellular speeds at 30mbps? That sounds ludicrous to me. Maybe in America, definitely not in many countries across the world.

2) I don’t know a lot of people who are repeat visitors to apple.com. Mentioning the fact that the time is initial load time would be redundant.

[+] toast0|6 years ago|reply
The speed of small transfers is going to be dominated by congestion window limiting, not bandwidth. So round trip time matters more than bandwidth.

All that said, Apple primarily cares about existing Apple users at this point, why would they optimize images for non-Apple users? They're much more likely to push HEIC if they care --- which for 250kB of images in the modern web, I kind of don't think they would.

[+] m463|6 years ago|reply
The other question is -- how does it affect battery life? New codecs usually take more CPU.
[+] Flimm|6 years ago|reply
I think there are more images than just the first two shown in the cropped screenshot.
[+] jccalhoun|6 years ago|reply
i just checked and according to speedtest.net, here in Indiana, I have 12. 29mbps down.
[+] xenonite|6 years ago|reply
This is only one half of the story. Given the increased network bandwidth, decoding speed matters. And here, JPEG is much faster. Also note that the JPEG decompression algorithms are highly optimized and coded in assembly language, and there are maybe even hardware decoders.

On android:

WebP 66% less file size than JPG, 267% more time to decode.

WebP 38% less file size than JPG, 258% more time to decode.

WebP 89% less file size than JPG, 319% more time to decode.

https://stackoverflow.com/questions/37812950/jpg-vs-webp-per...

[+] baybal2|6 years ago|reply
On Android, JPG decoder lib may or may not use a DSP on Qualcomm SoCs, WebP doesn't have any hardware decoding support.

Any size gains will be much more noticeable in the context of network transmission.

[+] isoprophlex|6 years ago|reply
Firstly, i don't get what apple has to gain by not supporting webp... Nevertheless:

The screenshot puzzles me, it shows two assets, and states that compressing these by an extra ~ 250 kb would save 2 seconds. Maybe on very slow connections?

Also

> Lack of proper support for [...] web notifications on mobile

I can do without these i guess

[+] jamil7|6 years ago|reply
The author didn't actually compare the different images in each encoding with examples of file size and image quality tradeoffs, just a screenshot from lighthouse.
[+] Flimm|6 years ago|reply
The screenshot is cropped, there are more than just two assets that would benefit from being in WebP.
[+] birdyrooster|6 years ago|reply
"i don't get what apple has to gain by not supporting webp"

I am not totally savvy as to the difficulty of the feat but, at least in principle, would it not cost them less in time and maintenance to not implement or support a feature?

[+] jakub_g|6 years ago|reply
Note that it's not only Apple who's been slow to adopt WebP. Mozilla was pretty skeptical for many years and only implemented this ~a year ago (instead they did a lot of improvements to JPEG encoders in the meantime).

At this point I'd be more interesting in Safari supporting AVIF, though for compat reasons WebP would be nice to have as well.

I'm not defending Apple, but I think the issue is that if Apple implements a new file format, it has to work reliably across whole Apple ecosystem (OS, image editing programs), not only in the browser. This is probably a huge undertaking. You don't want to download a picture and then your image viewer not being able to open it.

[+] kijin|6 years ago|reply
I get the argument, but the estimated savings are bogus.

All the images on the mobile version of apple.com add up to a grand total of 500KB. If reducing their sizes by ~40% (that is, 200KB) would save 2.25s, it means the whole page (just over 3.5MB) currently takes 40 seconds to load. But obviously nobody in the developed world is waiting 40 seconds for apple.com to load. The real savings are probably somewhere between 0.05s and 0.5s depending on network conditions. Not insignificant, but much less than what is promised.

If you really wanted to minimize the time it takes to load apple.com, you should start with the 10 scripts, 7 stylesheets, and 9 webfonts that together make up over 80% of the page size and consume a considerable amount of resources to parse and execute. But the benchmark doesn't tell you that. It's just a checklist of micro-optimizations that doesn't even start with realistic assumptions.

[+] gardaani|6 years ago|reply
I'm happy that Apple hasn't adopted WebP. JPEG XL and AVIF are better formats. Even Google is considering creating WebP2. WebP is already an outdated format (no HDR support), which should just die.
[+] mojuba|6 years ago|reply
At the expense of quality, at least it was Apple's argument against supporting webp.

And no, they didn't ignore it, it was included in one of the previous betas of macOS and iOS and removed later. Don't remember which.

[+] jamil7|6 years ago|reply
I was also wondering about this and what exactly happened there, I wonder if there are some underlying issues either technical or political there.
[+] ksec|6 years ago|reply
Apple doesn't even support their own HEIF on Safari. Why would one expect them to support WebP? Not to mention the gain on WebP is actually relatively small. JPEG, despite its age is still getting encoder improvement.

You would have expected or assumed nearly 30 years since the introduction of JPEG, we could compress an image at 0.5 bpp ( bit per pixel ) that has higher quality than the best JPEG with 1.0 bpp.

It turns out that is still not the case, Not with WebP, AVIF is closer but still not there. Just like in Audio, Despite all the marketing claims about mp3pro, HE-AAC... etc having mp3 128kbps quality at half the bitrate. It took us nearly 30 years to get an Audio Codec that sounds better than the best mp3 encoder at lower than 128Kbps bitrate. And that was Opus at 96Kbps. ( At this point no body cares about those bitrate savings any more )

That is not to say image compression aren't improving. [1] Is an 4K image compressed by the next generation VVC Reference Encoder at 350KB.

[1] https://imgsli.com/MTI1NDA

[+] aeonflux|6 years ago|reply
Could anyone one please tell me what is the purpose of the Web Notifications, other than invasive marketing.
[+] matharmin|6 years ago|reply
It's one of the few remaining features needed to create fully functional web applications, on par with the functionality of a native app.

As an example, I refuse to install a native Facebook application because of privacy concerns, but a web version with push notification support could provide the same functionality.

[+] sigwinch28|6 years ago|reply
- Calendar event notifications

- Instant messaging notifications (e.g. Riot.im, Glowing Bear, WhatsApp, Discord, Slack)

- Changes to files in cloud/collaboration services

Basically, any time you would use a push notification on a mobile device, but when the "desktop application" is essentially just an electron wrapper of the web UI.

[+] st3fan|6 years ago|reply
Redash sends you a web notification when a long running query has finished. Clicking on the notification opens Firefox to the right tab where you can see the results.

Just one example of legit use not for ads.

[+] kyriakos|6 years ago|reply
Here's a nice use case: I wouldn't mind getting a notification whenever someone responds to my comments on HN.

I also run Microsoft Teams in the browser, getting notifications for messages is quite useful.

[+] NightlyDev|6 years ago|reply
I guess you have some notifications on your phone, right? That's the point, notifications for things. If someone sends you a text then you need a notification so you actually notice it.
[+] snazz|6 years ago|reply
They're useful on desktop, for having things like Gmail open in the background, but they're not hugely useful on mobile. Usually if you want notifications you would already have the app installed.
[+] rmsaksida|6 years ago|reply
> The irony comes from the fact that Apple decided not to add WebP support to the Safari browser

I don't get it. Why is this ironic? Did Apple create the performance optimisation tool that suggested WebP?

[+] xrisk|6 years ago|reply
It’s ironic because it’s apple.com that of all sites would benefit from Apple supporting WebP. (according to the author, not me)
[+] ezoe|6 years ago|reply
"Apple can save the load time if they use the WebP"

Says the writer who use jpeg on his article.

[+] ben509|6 years ago|reply
He probably has to support Safari...
[+] tbolt|6 years ago|reply
Could this be related to non-network performance? The WebKit team seems very conservative in adding features to preserve/balance CPU usage and Battery Consumption. Which I generally applaud them for.
[+] Jyaif|6 years ago|reply
In general it's far better to reduce network usage in exchange for more CPU processing, not to mention that with faster websites you save on screen time as well.
[+] hmottestad|6 years ago|reply
Apple.com loads in around 1 to 1.5 seconds on either of my phone or my macbook. This is on wifi though, I guess the article presumes 4g.
[+] olah_1|6 years ago|reply
The webp issue is truly infuriating. I'd like to support it in my own websites, but I literally can't since a huge chunk of visitors use Safari.

The only hope seems to be mobile linux initiatives like PinePhone, etc. But I'm not holding my breath.

[+] KJKingJ|6 years ago|reply
If you use the <picture> element [0], then you can specify a MIME type on the srcset. Browsers will then use this to load an image they support - so if you have a set of pictures with a MIME type of image/webp and others with image/jpeg, WebP will be used by those browsers that support it and JPEG by those that don't. There's a good example at [1].

Alas although most browsers support the picture element, IE11 is the notable exception [2] and a polyfill is required.

[0] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pi...

[1] https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimed...

[2] https://caniuse.com/#feat=picture

[+] haydenkshaw|6 years ago|reply
You can use HTML <picture> elements to provide provide multiple image format versions for an <img> element e.g. preferentially use webp if browser supported, and fallback to using a widely supported format if not. Sounds like doing that might be of interest to you.
[+] kd913|6 years ago|reply
There is webpjs I think.

http://webpjs.appspot.com/

Basically if a browser does support webp, the script does nothing, but otherwise I think this script ends up supporting the image via javascript.

[+] fortran77|6 years ago|reply
1. Apple's users won't care. The ones who know about "WebP" will explain it away by claiming "Apple rejected it because it doesn't meet their high quality standards. The page looks more beautiful this way; WebP will drain the battery; WebP isn't secure; etc."

2. I'm pretty sure this isn't "irony." https://www.dictionary.com/browse/irony?s=t

[+] CharlesW|6 years ago|reply
As an experiment I grabbed all the images from v/home/f/images/iphone-takeover.

Originals: 584 KB for 18 files. After running them through ImageOptim: 353 KB.

So, I made the images ~40% smaller on average just by running everything through a JPEG optimizer.

When you compare that to the ~50% average reduction the author saw for two of the images, it makes WebP seem even less interesting.

[+] jakejarvis|6 years ago|reply
Their stubbornness around WebM is even more frustrating to me, honestly.
[+] baybal2|6 years ago|reply
Protip: if you are still hellbent on using huge picture with transparency, you can use two JPG files one original, and one as an alpha mask.
[+] htk|6 years ago|reply
Is this utility comparing to the same resulting quality?