loge.hixie.ch

Hixie's Natural Log

2004-02-10 19:28 UTC OperaShow Generator

One of the great things about working in the Technology and Research department at Opera is that I get to play with all kinds of new gadgets and technologies. For example, last week one of our embedded device customers said that one of our competitors had tested Opera against their browser and found Opera was slower, and Opera was asked to prove that this was not the case, so Herman and I were yanked out of our normal routine and told to test the two products all day until we had an exhaustive analysis of the two browsers' pros and cons. (We quite happily obliged, showing that over GPRS, on the test pages that the competitor in question had used, we out-performed them in page load performance by seconds, sometimes dozens of seconds, and sometimes sheer orders of magnitude — not to mention that said competitor had no DOM support, ridiculously limited CSS support reminiscent of desktop browsers from the late 1990s, and so forth.)

One of the technologies Opera is quite proud of is our CSS media handling. There are internal versions of Opera that handle handheld, tv, screen, projection, print, and even speech. And some of these modes have fallbacks, for example if a page is viewed in handheld mode but has no handheld style, it will fall back on the SSR (Small Screen Rendering) view.

We also have lovely "content adaption" mechanisms — for example in some builds you can enable MSR (Medium Screen Rendering) mode, and then Opera will adapt the formatting of the page to fit your window. I should point out that this is not at all standards compliant, but it isn't supposed to be: its purpose is to handle the cases where the page wasn't designed for the device in question, and would be unreadable if displayed per the specs. Authors who target these devices can rely on standards-based rendering, since MSR won't trigger unless the page doesn't fit.

One of the medias that Opera supports which no-one else yet supports is projection. (Mozilla doesn't yet support this, it's bug 120398.) When you switch to full-screen mode, Opera switches from using your screen styles to your projection styles. This would be of very limited use, if it wasn't for the fact that the projection media is a paged media type, much like print, so properties like page-break-after work!

This lets you do slide shows in HTML with no JavaScript and no :target hacks, which is pretty cool. Håkon (my boss) wrote a little script that will let you make a three-page presentation without even touching the markup. As an added bonus, it even embeds the images you specify using data: URIs, so the page is completely self-contained.

I played around with it and came up with this cute little presentation.