FRAMESET and IFRAME - Don't Do It!
18 Oct 18, 22:12
Why shouldn't I put my albums into my own pages using a FRAMESET or an IFRAME?
First, let's address the FRAMESET. This is deprecated, and is no longer part of the HTML standard. It is not supported in any mobile browser, and misbehaves horribly. It is not a question of display size - the mobile browsers literally do not know what a FRAMESET is, or how to display it. Some desktop browsers may still display a FRAMESET correctly, but this is not something you can rely on - the browser code for it is legacy, and may disappear at any time, without notice.
Support for the IFRAME is still present in most browsers. On a mobile device, however, it is often unusable. The visitor may be presented with a scrolling area within a scrolling area, but with only touches and swipes, he may not be able to control what gets scrolled, and when. In short, an IFRAME on a mobile device is very visitor-unfriendly.
But in the era of responsive skins, the real problem with an IFRAME is that it defeats the purpose of the responsiveness completely. Consider what a responsive skin does with a slide image. It tries to show the image as large as it can, given the size of the viewport, and to center it within that viewport.
So, what is a "viewport?" If the album is being seen on the page, by itself, the viewport is simply the browser window. If the browser window is maximized, the viewport is just the monitor. So, the image is shown to its maximum advantage, and is centered.
But if the album is shown within an IFRAME, the viewport is that frame, and it will generally be a fixed size. The responsive skin doesn't "see" the dimensions of the browser window or monitor - it sees only the dimensions of the IFRAME.
If the IFRAME is smaller than the browser window or monitor, the slide image is shown only as large as it can be within the IFRAME, and is centered within it. This is cheating the visitor whose monitor is larger than the IFRAME, who could be seeing the image much larger.
But even worse is the situation in which the IFRAME is larger than the browser window or monitor. The album code shows the image as large as it can within the IFRAME, and your visitor now has to scroll up and down or back and forth to see the whole image. If the IFRAME is much larger than the monitor, the centered image may not even be visible on the screen unless the visitor scrolls to it!
You chose a responsive skin precisely to avoid having to keep images small enough to be seen on small displays, and to avoid the scrolling mess of a larger image, but by putting the album into an IFRAME, you've completely undone the responsiveness of the skin.
The better approach is almost always to let the album stand on its own, and use the navigation provided by the skin to let your visitor return to your own page. If you want to provide things like a custom banner or navigation menu, many skins provide ways to incorporate your own content into the album without resorting to the sledgehammer of an IFRAME.