51

iOS Safari and Memory Management

 4 years ago
source link: https://www.tuicool.com/articles/mQBBBv6
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Here’s what I don’t get about the iPhone’s Safari and memory management.

Safari will sometimes forget the website it has loaded and needs to reload them when you go to their tab. And they tell us that it’s because the iPhone has limited memory and when other apps need it, it has to free it. Unlike on the Mac, there is no virtual memory on the iPhone, so the system cannot automatically restore what was once removed from memory.

Okay, but why does Safari insist on keeping everything in memory? Why cannot Safari just save what it has downloaded to disk? My photos and videos don’t get destroyed when the phone is low on memory, why webpages should? Even if I opened a webpage a year ago, there is no reason on Earth to reload it from network when I want to look at it today. It’s already open, just show it to me! I didn’t press Reload, so please don’t do what you were not asked to.

I suspect it’s yet another corollary of general shittiness of modern browsers where developers are obsessed with JavaScript performance and security, and completely forget about being nice software .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK