SafariMobile.app refreshing background windows.

Discussion in 'iPod touch' started by davibe, Jan 2, 2008.

  1. davibe

    davibe New Member

    Joined:
    Jan 2, 2008
    Messages:
    12
    Likes Received:
    0
    Opening some safari windows with different sites I noticed a strange behaviour.
    The frontmost window works fine, but when I try to change safari window, I see that all other sites are blank. When i select one of the previous windows it gets refreshed and works fine.. but if you were using a webapp (like meebo) it gets restarted.
    The same thing happens if you minimize safari to use another application.. The weapplications opened in a window that's not in the foreground are not really running (they get disconnected) and after a while they're forced to refresh.. or at least that's what I suppose.

    The problem is less visible after a reboot and clearling cache or if opening only 2 sites.

    Anyone got this too ? is there any known solution ?

    I'm using 1.1.2 on a 16G ipod jailbreaked, I had the same problem with 1.1.1 and I tried reflashing everything.
  2. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    It's not really a problem, it's just that Safari doesn't really have a disk cache. It keeps visited websites in memory but if the process dies, the cache is emptied.
  3. davibe

    davibe New Member

    Joined:
    Jan 2, 2008
    Messages:
    12
    Likes Received:
    0
    I do not agree.. The process is safari itself (1), each page (window) is handled in a thread.
    If I open 5 windows I see safari has 5 threads. We're not talking about cache. Since those 5 sites are running, all the data they need should be in the ram.
    If I minimize Safari with meebo opened, and use MobileMail.app fora while.. why should meebo loose connection ?
  4. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    I don't think the number of threads has anything to do with the number of open pages, but I see what you mean - that's what I said, there is no cache but the memory. And apparently after a while it get wiped out... maybe there's a file that can be tweaked somewhere for that.

    The obvious reason why the webapps aren't running if you put them in background is surely the same most of the applications are also frozen in sleep mode: to save the battery.
  5. davibe

    davibe New Member

    Joined:
    Jan 2, 2008
    Messages:
    12
    Likes Received:
    0
    I agree, but since i'm not closing the IM webapp, and i'm not pressing sleep button.. Why should I get disconnected ? About the cache.. well there is a fuction in system preferences that clears the cache. So if there were no cache what should be cleared ?

    I'm uploading a video example of the problem. I'll post a youtube link as soon as it's finished.
  6. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    I suppose they mean the memory cache... it's playing on the words

    Please Register or Log in to view images



    I know you don't put it to sleep, it's just that they probably apply the same principle.

    I suppose that to solve your problem there should be an application, other than Safari but which uses the same capabilities to open a webapplication, and keeps running even if the application is put in background. The Installer does that in some way, it can open web pages even if the GUI is not as friendly as Safari... so it shouldn't be too hard to build such a program.
  7. davibe

    davibe New Member

    Joined:
    Jan 2, 2008
    Messages:
    12
    Likes Received:
    0
    I just uploaded the video showing exactly my problem. As I wrote in the video description, the same thing happens also with ony 2/3 opened pages.

    scythan, ty a lot, if I were a developer I'd try to develop something like that.. I'm a python guy, maybe I can play around pyObjC and something like that.

    Are there any roumors for a firefox mobile / opera mini running on the ipod touch or iphone ?
  8. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
  9. davibe

    davibe New Member

    Joined:
    Jan 2, 2008
    Messages:
    12
    Likes Received:
    0
    I thought I could achieve the same result creating a multiple page viewer using javascript to switch between iframes.
    I tried to create something like TABS and this is a preview webapp with 3 sites you can't change but it seems to work.

    Browse it with the iphone!
  10. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    Looks promising.

    Please Register or Log in to view images


    Yes, fortunately Javascript seems to be a good asset on the iPod.

    Then you can put your iKeep page + Javascript in a booklet that resides permanently in the bookmarks

    Please Register or Log in to view images

Share This Page