Frames Both Hidden and Visible


The question is, exactly what purpose can HTML frames serve in the brave new world of Ajax applications?

To be perfectly honest, I don’t exactly know, but I can offer some possible suggestions.

The first suggestion that I can offer is to use an IFRAME with CSS positioning instead of either a JavaScript alert or a JavaScript prompt to convey information to and from the visitor. Not only would it allow for additional opportunities regarding the physical layout, but it wouldn’t have the stigma associated with pop-ups. In fact, it might even provide a way around some popup-blocking software.

Here’s how it would work: A zero-sized IFRAME would be created along with the original page. When needed, it could be moved about the page using CSS positioning and could be resized to display the required information. The source of the information could be from the page’s JavaScript, another page on the web server, or a web service.

My second suggestion is to use the frames, especially hidden ones, as somewhere to cache information. I’m not only referring to the garden variety forms of information, such as XML or XSL stylesheets, but also to in-line Cascading Style Sheets. Imagine the reaction of visitors discovering that they can customize their browsing experience on a website that already feels like an application. Think along the likes of using the CSS from the fifth IFRAME for Bob, and you’ll get the idea.

The same technique can also be used to cache large XML documents, of the kind that eat up bandwidth. Caching whole or nearly whole pages that don’t often load is also a possibility, as with the Items page from earlier examples. Instead of retrieving the XML every time the visitor wanders to the page, just build the page once and cache. This would also have the advantage of further increasing application speed.


Comments

Leave a Reply

You must be logged in to post a comment.