Topic: Sluggish performance within iframe

Hi All.

First time posting here. I have a problem currently with performance when embedding simpleviewer within an iframe on mobile safari. I am using the same iframe to load various other pages by just changing the src attribute of the iframe. The reason i did this is so that mobile safari doesn't crash on my ipad because it has reached it's memory limit of 10MB or whatever it is. Now i have noticed a sluggish behaviour when having simpleviewer in the iframe. If I have no iframe and press the next and previous buttons, it is blazing quick and smooth but with the iframe everything is just slower. Is this a problem I can fix or is this just a side effect of the iframe on the ipad?

Looking forward to some responses.

Stefan

Re: Sluggish performance within iframe

As far as I am aware, there should be no performance issues by embedding a SimpleViewer gallery in an <iframe>.
Please post the URL to your gallery and I will take a look at it on my iPod Touch.

Steven Speirs
SimpleViewer Support Team.

Re: Sluggish performance within iframe

Unfortunately the whole thing is not online. I am creating an app using normal html markup. I have included the iframe code below.

This is the normal simpleviewer page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>SimpleViewer Gallery</title>
</head>

<body>

    <!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    simpleviewer.ready(function () {
        simpleviewer.load('sv-container', '100%', '100%', '222222', true);
    });
    </script>
    <div id="sv-container" style="background-color: #222222;"></div>
    <!--END SIMPLEVIEWER EMBED -->

</body>
</html>

This is the code for the iframe page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>SimpleViewer Gallery</title>
    <style type="text/css">
    html, body {
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
    }
    </style>
</head>

<body>

    <iframe src="index.html" width="1024" height="768" frameborder="0" scrolling="no" style="background-color: #222222;"></iframe>

</body>
</html>

Now if the iframe is smaller than the landscape dimension of the ipad then it is as fast as is it is supposed to be. Once it reaches the size of 1024 x 768 then it becomes slow. Any ideas. Maybe it is just the ipad 1's performance?

Re: Sluggish performance within iframe

Maybe it is just the ipad 1's performance?

Perhaps, but I would not expect an iPad 1 to suffer performance issues loading a page into an <iframe> of dimensions 1024px x 768px.
If your gallery was online, I could test the speed on my iPod Touch and report back in this thread.
However, I have used your <iframe> page as a template and have created two HTML pages: one with an <iframe> of dimensions 800px x 600px and the other with an <iframe> of dimensions 1024px x 768px.
Into both <iframe>s, I have loaded the same test gallery.
Both galleries perform similarly on my iPod Touch 4th Gen iOS 5.1 (and in desktop browsers) and neither gallery seems to be faster or slower (or any more sluggish) than the other.

Steven Speirs
SimpleViewer Support Team.

Re: Sluggish performance within iframe

Thanks for testing it out. I'll ask my friend to try this on his ipad 2. I'll report back what I find out. Thanks again.