iPad [Safari] Why do websites reload when I switch tabs?

ntegra

macrumors regular
Original poster
Oct 10, 2010
155
5
It really cuts down on the speed of web browsing. Is it really demanding of the browser to keep the website open in the background?
 

ionjohn

macrumors 65816
Jun 5, 2013
1,183
9
Canada
Some say it's the lack of ram that causes such issues, I can't really talk about it since I've never owned an ipad for more than a week
 

richwoodrocket

macrumors 68020
Apr 7, 2014
2,127
111
Buffalo, NY
Probably to give you the most current version. What if it's a news site and there was a new story put on and if it didn't refresh, you wouldn't see it. I like that it refreshes automatically.
 

Menel

macrumors 603
Aug 4, 2011
6,199
1,048
It really cuts down on the speed of web browsing. Is it really demanding of the browser to keep the website open in the background?

RAM Memory. IOS devices are pretty skimpy. It unloads the website to make space for whatever new task you are asking.
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,375
181
RAM Memory. IOS devices are pretty skimpy. It unloads the website to make space for whatever new task you are asking.
Exactly.

----------

Probably to give you the most current version. What if it's a news site and there was a new story put on and if it didn't refresh, you wouldn't see it. I like that it refreshes automatically.
You like it - 99% of other users, particularly on slow(er) / expensive connections, don't. Particularly not the ones trying to enter something in a Web form and don't want to see the stuff they've already entered disappear because of the refreshes.

----------

It really cuts down on the speed of web browsing. Is it really demanding of the browser to keep the website open in the background?
It is. I've published several benchmarks here in the iOS7 forums. In a nutshell: a medium-sized Web page can easily make Retina iPads allocate 150-200 Mbytes of RAM just for those Web pages. If you open other pages in another tab and the amount of free RAM drops under 100Mbytes, Safari will always free up the for other tabs allocated memory.
 

EdgardasB

macrumors 6502a
Apr 14, 2014
618
80
Lithuania
It is. I've published several benchmarks here in the iOS7 forums. In a nutshell: a medium-sized Web page can easily make Retina iPads allocate 150-200 Mbytes of RAM just for those Web pages. If you open other pages in another tab and the amount of free RAM drops under 100Mbytes, Safari will always free up the for other tabs allocated memory.
I don't know it if it can be compared with os x mavericks safari but within i have opened facebook, macrumours, 9to5mac, 9gag and via activity monitor safari doesn't use even 150mb RAM. While with mountain lion it used 2 or 3 times more.

Maybe iOS 8 will give some major improvements with RAM management and some tricks with memory compressions like they did with mavericks
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,375
181
Maybe iOS 8 will give some major improvements with RAM management and some tricks with memory compressions like they did with mavericks
I wouldn't hold my breath. Safari / UIWebView has had the same problems since 2008. (With the release of higher-res screens, the problem got much worse.) That is, Apple has always been aware of the problem. However, they haven't really bothered - for 5+ years....
 

seble

macrumors 6502a
Sep 6, 2010
930
113
I remember my old iPod touch back in 2008/9 would refresh pages. It's always been the apple way and I've never understood it. Either Apple needs to implement much more RAM or much faster flash storage so that pages can be saved to the storage and recovered from the memory much more quickly!
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,375
181
I remember my old iPod touch back in 2008/9 would refresh pages.
Exactly. This is what I've referred to when stating this problem has always plagued iOS devices.

It's always been the apple way and I've never understood it. Either Apple needs to implement much more RAM or much faster flash storage so that pages can be saved to the storage and recovered from the memory much more quickly!
It seems the vast majority of customers don't really mind these problems. Which is pretty understandable - a totally non-tech-savvy person (the vast majority of iOS customers - we do NOT represent the Average Joe using iDevices) won't get infuriated when his/her tabs constantly reload. Simply because he/she doesn't know that, with proper programming or much more RAM, there would be no (or very few) reloads.
 

Shuri

macrumors 6502
Nov 23, 2011
330
0
It really cuts down on the speed of web browsing. Is it really demanding of the browser to keep the website open in the background?
To just answer your question (since I don't see this in here till now):

An iPad doesn't have much memory to save things, which were loaded from internal storage or the internet, "temporarily" (They can stay there for quite a long time in theory) as compared to regular computers.
There are two reasons for this: Firstly, the iPad comes with a smaller RAM than computers. Secondly, Computers can virtually enlarge their RAM (and thus getting a bigger memory) by storing things on the Hard Disk (Or on the SSD more recently), which iOS doesn't allow.

So iOS has to do a lot of memory-management to make sure everything works fine. In practice this means that every time the system needs more space in memory than it currently has available, it "asks" Safari to make some free space. So Safari has to make room by deleting the oldest (by last use) Tab. That's why it can happen, that Safari needs to refresh a page when clicking on its tab. In my experience you can switch between enough tabs to make a normal web-research. But if you multitask and use another app in the meantime it can happen, that safari needed to close a few pages to make sure the other app can work flawlessly.
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,375
181
In practice this means that every time the system needs more space in memory than it currently has available, it "asks" Safari to make some free space. So Safari has to make room by deleting the oldest (by last use) Tab. That's why it can happen, that Safari needs to refresh a page when clicking on its tab. In my experience you can switch between enough tabs to make a normal web-research. But if you multitask and use another app in the meantime it can happen, that safari needed to close a few pages to make sure the other app can work flawlessly.
1. Nope, you don't need another app (user-started process) for background tabs to be unloaded. It'll also happen if you reboot your device (this makes sure nothing runs in the background) and don't start anything but Safari.

2, it's Safari's (more precisely, UIWebView's) enormous memory needs (easily 100-200 Mbytes for a middle-sized Web page on a Retina iPad; on iPhones or non-Retina iPads, the memory usage is much lower because of the lower-res screen) that cause all this to happen. This is why background tabs can instantly be killed if you start loading a large page in another tab - for example, with nin.com.
 

Shuri

macrumors 6502
Nov 23, 2011
330
0
1. Nope, you don't need another app (user-started process) for background tabs to be unloaded. It'll also happen if you reboot your device (this makes sure nothing runs in the background) and don't start anything but Safari.

2, it's Safari's (more precisely, UIWebView's) enormous memory needs (easily 100-200 Mbytes for a middle-sized Web page on a Retina iPad; on iPhones or non-Retina iPads, the memory usage is much lower because of the lower-res screen) that cause all this to happen. This is why background tabs can instantly be killed if you start loading a large page in another tab - for example, with nin.com.
Sorry, I didn't make very clear that it can happen, how you said, that a new tab is the reason for needing to delete another page out of the memory. Thank you! :) But again it's the system, which tells safari to release some memory.

Don't want to nitpick here, but actually your second point is not the reason for it to happen, but a reason for it to happen that frequently. It wouldn't happen on a PC, because it would use the backing store on the Hard Disk to save unused data, something iOS doesn't.
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,375
181
Don't want to nitpick here, but actually your second point is not the reason for it to happen, but a reason for it to happen that frequently. It wouldn't happen on a PC, because it would use the backing store on the Hard Disk to save unused data, something iOS doesn't.
Yup, you're right in that PC's / MAcs have virtual memory (in addition to their standard RAM, which is typically at least 4-8 times more than that of a Retina iPad.) This is why while loading nin.com results in allocating about 600M of RAM in both Safari and Firefox (I've just measured this on my 10.8 17" MBP), these tabs are very rarely (if ever) get unloaded.

Nevertheless, Apple could have done better. Just look at Opera Mini. While it doesn't really support scripting / AJAX / dynamic content, it has orders of magnitude less memory requirements (if its proxy server works, that is.) This alone makes it possible for it to load even dozens of nin.com instances without any kind of tab unloads / crashes.

That is, Apple could have produced a little less RAM-hungry engine.
 

Shuri

macrumors 6502
Nov 23, 2011
330
0
Nevertheless, Apple could have done better. Just look at Opera Mini. While it doesn't really support scripting / AJAX / dynamic content, it has orders of magnitude less memory requirements (if its proxy server works, that is.) This alone makes it possible for it to load even dozens of nin.com instances without any kind of tab unloads / crashes.

That is, Apple could have produced a little less RAM-hungry engine.
You're right, they should work something out.

On the other hand, nin.com is a horribly implemented page, but great for benchmarks :D

Nevertheless, Safari shouldn't be able to be crashed by it
 

Apple blogger

macrumors 6502a
Feb 28, 2013
869
146
It really cuts down on the speed of web browsing. Is it really demanding of the browser to keep the website open in the background?
Mine don't ...they never reload .. Only if they are kept in the background for too long... But they should reload! I mean if they don't you can't know if anything has been updated for eg. Comments... So it's proper only .. Nothing dude to "lack of ram"
 

sunking101

macrumors 604
Sep 19, 2013
6,671
1,812
I am more frustrated by webpages 'hanging' whilst loading. The blue progress bar gets approx 1/8th across and then freezes. I have to close Safari completely via the multitask tray and then open it up again. This happens multiple times per day.
I experienced this on my iPhone4 with iOS6, so it isn't a new iOS7 problem. I did think it happened way less often with 7.0.4 though.
7.1 is dreadful for it on my i5.
 

C DM

macrumors Sandy Bridge
Oct 17, 2011
47,538
16,039
Mine don't ...they never reload .. Only if they are kept in the background for too long... But they should reload! I mean if they don't you can't know if anything has been updated for eg. Comments... So it's proper only .. Nothing dude to "lack of ram"
Tap the reload icon. Done.
 

Apple blogger

macrumors 6502a
Feb 28, 2013
869
146
Tap the reload icon. Done.
I'm Not complaining... The OP has a problem with reloading... I think my comment gave out a wrong picture...when I said "it should load" I was telling the OP that there's absolutely no problem in reloading... But as he said it keeps reloading.. Mine doesn't which is fine because it shouldn't load very often but only after a while
 
Last edited:

C DM

macrumors Sandy Bridge
Oct 17, 2011
47,538
16,039
I'm
Not complaining... The OP has a problem with reloading...
You seem to say that yours don't reload for some reason and you want them to. Unless that was some sort of sarcasm, which didn't quite fully relate it would seem.
 

Apple blogger

macrumors 6502a
Feb 28, 2013
869
146
You seem to say that yours don't reload for some reason and you want them to. Unless that was some sort of sarcasm, which didn't quite fully relate it would seem.
Sorry I was slow in editing my comment check it again
 

C DM

macrumors Sandy Bridge
Oct 17, 2011
47,538
16,039
Sorry I was slow in editing my comment check it again
I see what you mean now. To be fair they don't usually reload on their own to check for new data (unless perhaps a site specifies that), most of the time when they do it is in fact because the memory they were using before got allocated to something else at some point and when you are getting back to the tab it needs to reload as its previous state isn't saved in memory anymore, so there's a role that RAM can play in that.
 

Apple blogger

macrumors 6502a
Feb 28, 2013
869
146
I see what you mean now. To be fair they don't usually reload on their own to check for new data (unless perhaps a site specifies that), most of the time when they do it is in fact because the memory they were using before got allocated to something else at some point and when you are getting back to the tab it needs to reload as its previous state isn't saved in memory anymore, so there's a role that RAM can play in that.
Okay... I tried a little experiment... First opened 3 tabs on safari and switched to each of them
.. And then I opened another app and safari running in the background.. Then I switched back to safari and went on the 3 tabs one by one... Then in the similar way I opened 4 more apps and kept the others running in the back ground, going into safari (and checking each tab)alternative after opening a new app ...

My observation.. None of the tab reloaded.. I know how a tab reloads(with the blue line).. So when according to you should the tab reload..
(I know this was a little desperate)
 

C DM

macrumors Sandy Bridge
Oct 17, 2011
47,538
16,039
Okay... I tried a little experiment... First opened 3 tabs on safari and switched to each of them
.. And then I opened another app and safari running in the background.. Then I switched back to safari and went on the 3 tabs one by one... Then in the similar way I opened 4 more apps and kept the others running in the back ground, going into safari (and checking each tab)alternative after opening a new app ...

My observation.. None of the tab reloaded.. I know how a tab reloads(with the blue line).. So when according to you should the tab reload..
(I know this was a little desperate)
There isn't a particular count that would do it as it depends on what else might be on your phone how long something has been in the background etc. Some of the other posters in this thread have more technical explanations. Perhaps if you really want to try it out is you can open a number of tabs and then open and run some fairly big and intensive app like a graphics heavy game that you would load and play for a a bit. Then after that try to go back to Safari and see what happens when you go to different tabs.
 

cynics

macrumors G4
Jan 8, 2012
11,311
1,696
Notice it on my iPad 3 and it seemed even worse on my iPad Air.

Hate to say it but they should program the browser like it's done on Android. My old Xoom can handle tab browsing much better then my iPad.

I might not notice it on my iPhone because I generally don't multitask like I do on a tablet.

Just yesterday I was ordering food online. Had a huge order all set up and customized. Switch tabs to research what was in a particular desert, switched back and the tab reloaded and lost my order. Very obnoxious.