HA HA HA HA HA HA I have found out why my iPhone iCloud backup was larger than 5GB but there was no way to reduce its size!

Turns out... if you bookmark a web app to your Home Screen then its data is included in your iCloud backup. This is very good! Nice one Apple.

But it doesn't show up in the "Backup Details" list of apps in your iCloud Backup settings, so you don't know where the space is gone. This is not as good. I shall file a bug.

https://feedbackassistant.apple.com/feedback/15158244 filed if any Apple dev people look at this. I don't think this is a Safari problem; Safari is doing absolutely the right thing here. This is an iCloud Backup Settings problem, and it's not exactly the only one, since "why is my iCloud Backup bigger than it ought to be" is a common question. Still, this is very useful to have found out. Also, it might stop me playing Wordle every day, although I can doubtless re-add it now!
Feedback Assistant

as days pass by — On iOS, Home Screen web apps are part of your iCloud Backup

A post by Stuart Langridge (sil)

as days pass by
@sil iOS Settings should allow users to clear cache for individual home screen web apps (HSWA). The user should be able to sort HSWAs by cache size, descending, and then clear cache for the ones with the largest cache sizes.
@simevidas just to check, when you say “should” there, do you mean “settings does currently show this information” (in which case, where, that sounds useful!) or “settings doesn’t but I wish it did” (in which case I agree with you completely! although iCloud backup settings should show web apps too)

@sil @simevidas
I haven't confirmed that this includes Home Screen web apps but there is in iOS Settings > Safari > Advanced > Website Data. It lists domains sorted by cache size and there's a search bar to find ones not on the initial list. Swiping left reveals a Delete button.

An Edit button at the top reveals a button to tap to reveal the Delete button (this might be new in iOS 18, good for people who have trouble swiping).

@cwilcox808 @sil Ah good, I did not know about that list. I thought iOS only lets you delete the entire Safari cache. That being said, my home screen web apps are not in this list, which suggests that their cache is stored separate from Safari’s cache, and the user cannot clear cache for individual HSWAs.
@simevidas @cwilcox808 yup. As far as I can tell this allows you to delete stuff by website origin, but Home Screen web apps are not included in this list, and I don't think they are listed anywhere else so you can see the size they're taking up. (Taking a backup to your computer and looking in it does work, as per the blog post, but that's not all that helpful!)
@sil @simevidas
To emphasize the separation of Home Screen web apps from Safari but to also let you do something other than deleting and re-adding them, they should be listed along with the native apps in iOS Settings > General > iPhone Storage and provide the same Offload App option. Only the icon and other essentials would remain.
@sil FYI, I'm working on reducing disk space usage on Phanpy. Turns out the service worker cache are never cleared properly 😩
@cheeaun no worries. I removed the app and re-added it, which took about one minute, and that reduced the size. Good to hear that the underlying size is being fixed though; a gigabyte is a lot of storage to be using! So thank you for that!
@cheeaun just to follow up on this, I checked my backup size again and phanpy was back up to 1.5GB. So I removed the home screen bookmark and added it again, which only took about one minute, but I wanted to report back; you may still be working on fixing this and if so no worries (as I say, it wasn't hard to recover from!) but I thought you'd like to know it's still going on in case you were thinking it was fixed already.

@sil oh, thanks for the follow-up! This is very helpful.

The current site now has a timed interval to clear (SW) cache, but it only runs when "idle" (not interacting with the page for a period of time). I suspect it never becomes "idle" on your phone 🫣

I'll add some debugging UI to further investigate this (dev site already has it but I supposed you're using the stable site). Still weird that there's no way to see how much disk space a PWA use on iOS, and no UI to clear them per PWA 😩

@cheeaun yeah, I just never tear myself away from phanpy, this is true :-)

It is annoying that you can't see how much space a PWA is using, I agree. Literally the only way I know is to check the size of the .webclip in a full backup, which is very awkward. I have filed a feedbackassistant, but we never find out if that gets acted on. Can you know inside phanpy how much space it's taking up? I'm not sure. I can use the dev site to test if that would help; where's that?

@sil the only way I can know how much space taken is on desktop Chrome, devtools → Application → Storage. I've tried connecting the PWA on iPhone to Safari devtools → Storage, it doesn't say how much space it's using.

Dev site is on https://dev.phanpy.social/ - the debugging section is hidden under the empty space below About section. Sizes are not calculated but at least can see how many cache keys are stored.

Phanpy Dev

Minimalistic opinionated Mastodon web client

@cheeaun https://gist.github.com/ebidel/188a513b1cd5e77d4d1453a4b6d060b0 seems to work usefully for me, which grabs a blob of all cached resources and sums the sizes. But I'm not sure where phanpy is storing stuff and maybe it's in indexeddb or something. (I'd test this on ios in the devtools, but because I reinstalled the PWA it doesn't have a big cache to test any more!)
Print service worker cache sizes and overall bytes cached.

Print service worker cache sizes and overall bytes cached. - sw_caching_size.js

Gist
@sil thanks! Added button for the cache sizes check - doesn't seem to match the numbers I'm seeing on Chrome devtools, didn't really dig further into it but I guess it's still better than nothing 😬
@cheeaun a report: I’m running the dev version and the show cache size button doesn’t seem to do anything on my iPhone. The show cache keys button works.
@sil what's the current dev version you're running on? It wasn't working for a while (for some reason, only on Mobile Safari), I tried fixing it and should be working now, else it should show another error.
@cheeaun aha! 2024.11.10.62dc2ca works and I get a value, so apologies, that’s been fixed!
@cheeaun @sil Looking at the debugging… wondering if fetch-home-* fields could be used in diagnosing a slow instance, or are those numbers apt to mislead?

@timbray possibly but could be slow connection/network too.

The whole bunch of fields there was me desperately trying to find out why the app start-up time became slow (only on Mobile Safari). Turns out it was due to the very huge Service Worker cache, as I had this PWA installed way earlier than anyone and the caching strategies were changed a number of times since the beginning.

@sil I also reported bugs through the feedback assistant and one was very specific: My rather niche mail provider (Migadu) has non-advertised and partially undocumented CalDAV and CardDAV support which I use on all my devices just fine. Even the work provided macbook with Apple Calendar + Contacts could talk to them. But iOS Contacts denied me the service (it would always try to contact to the Calendar endpoint).

Indeed, the next minor update silently fixed this and also fixed the related UI glitch. So it does seem that Apple listens(?) I'm pretty sure there's been not many who reported this. So, good luck! :3

(Also, I've too been on the journey from elk to phanpy, it's a neat little app! :3)

@sil
This is exactly why we call mobile backups a "Black Box"!

Apple hides so much metadata and "invisible" storage that users end up paying for iCloud space without knowing why.

That’s the problem we’re solving with #Keepita. We believe you should be able to see EVERY byte inside your backup, from hidden web app data to system files, without the guesswork.

Great catch on the home screen bookmarks!

#Keepita #iCloud #iOS #Apple #Backup #Transparency #DataPrivacy #BuildInPublic #TechIssues