Thursday, 2. November 2006, 14:30:40
development, web, opera, articles
...
http://dev.opera.com has opened! It's supposed to be a resource for web developers, ranging from tutorials, libraries, examples, articles to discussion about web techonologies like SVG, AJAX, HTML, CSS, Voice, Canvas etc.
I even got my own article about making cross-platform AJAX applications on the front page. Make sure you visit it, and bookmark it, it will prove a useful resource if you are interested in web technologies.
NB! Don't forget the web chat today which is about dev.opera. More details here: A new developer site (#webapps)
Friday, 6. October 2006, 10:32:36
cartoon, web, cross-platform, mobile
One of the biggest sins of web development is to sniff user agents and serve different content based on that. Various web browsers are affected by this including Opera and now also Microsoft Internet Explorer 7.This is not only bad since you need to maintain different versions of your content, but in addition sniffing user agents is error prone, since UA-strings change, they might contain false information or users might override them.
A recent trend among content providers is to make special versions of their sites made for mobile phones and other small screen devices. This might sound like a good idea, but eventually you might end up maintaining a vast amounts of slightly different versions. The devices you tailor for might change in the future or the web browser might get new technology to accomodate the content in a different way.
Norway's second largest newspaper Dagbladet has just
released a special version of their page for Nintendo DS. One of the features they brag about is having their cartoon strips rotated 90 degrees to avoid horisontal scrolling on small devices. This is of course totally unnnecessary as by splitting the strip up into several images, and making them "float" in the correct order will make them wrap appropriately depending on the width of the screen. In addition it's easy to set a minimum size to avoid needing a microscope to be able to see it.
I quickly put together a small example on how to let a cartoon strip show just fine in several resolutions:
<!DOCTYPE html>
<html>
<head>
<title>
Write once, show up fine everywhere
</title>
<style type="text/css" media="handheld,screen">
<!-- shared styles -->
img {
max-width: 100%;
min-width: 100px;
}
</style>
</head>
<body>
<img src="m1.png" alt="M-2006/10/06-rute-1" />
<img src="m2.png" alt="M-2006/10/06-rute-2" />
<img src="m3.png" alt="M-2006/10/06-rute-3" />
<img src="m4.png" alt="M-2006/10/06-rute-4" />
<br />
<a href="http://www.start.no/tegneserier/m/?1160085600">Original strip</a>
</body>
</html>
The result is as follows:
See the example pageOk, this solution might not fit all purposes, for instance a strip might not be divided into different frames, or dividing it might take more resources than simply rotating them.
However, my point is really that making slightly different versions of your content each time a new device or resolution pops up is futile and unnecessary. With
CSS and
media queries you can keep your content unchanged, but still make it show up nicely everywhere.
Tuesday, 22. August 2006, 04:40:00
my.opera, opera, content, web
...
Some of you have asked how I added a disclaimer to my blog. It's basically a simple CSS addition.
By going to My Account -> Change design -> custom stylesheet adding the following CSS in the form presented and making sure Use my custom style sheet together with the current theme is selected you can quickly add a nice and shiny disclaimer showing on top of all your blog. Nice and easy
Using the :before selector on the main element lets you add a fake element right before the main content starts. The content: attribute lets you even fill out the text.
So, go ahead, and feel free to show me how you use it!
#mainwrap:before {
content: "The views expressed in this blog are my own and do not necessarily reflect the views of any former, current or future employers or employees of mine.";
color: black;
background-color: #ffff99;
font-style: italic;
border: solid #aaaa77 1px;
padding: 10px;
white-space: normal;
margin-bottom: 15px;
margin-right: 210px;
float: none;
width: auto;
display: block;
}
Sunday, 12. March 2006, 18:07:08
opera, acid2, web, future
...
With Opera finally passing the Acid2 test with last week's "weekly build", we yet again see the possibility of the web preparing for the future.An acid test is something that proves whether something is good, effective, etc, or not. The Acid2 test is a test page written by the WaSP (The Web Standards Project), a "grassroots coalition fighting for standards that ensure simple, affordable access to web technologies for all." The test is made to help browser vendors ensure proper support for web standards in their products, and it even contains errors deliberately to ensure browsers handle those properly.
We are entering a new era for the web. With stronger focus on dynamic content on the client side carried out transparently providing extensible interfaces for end users (AJAX), a strong emphasis on the use of open standards and generally putting the burden on browser implementators rather than on black magic done by web developers, the web is moving forwards. The time were you needed to tailor content for browsers, their specific behaviour and bugs, and other quirks is almost gone.
As more browsers are pouring in with support for the Acid2 test and in general embracing open standards pushed by the W3C, developers can concentrate on making good content using well-defined standards. Gone is the duopoly of the 90's where you had to choose between bad or worse. Users can choose between various browsers that support open modern standards, on different hardware and different operating systems. Browser vendors can compete on user interface and good implementations rather than to rely on users in bliss accepting 10 year old technology as being the web.
So, wether your browser of choice supports Acid2 or not, at least make sure it embraces open standards and allows you to take advantage of what the web has to offer today and in the future. Don't miss out and ditch your stone age browser in favour of the new shiny ones that are developed by people that care about the web experience. Don't accept that your favourite web site is behind with features because its developers thinks writing specifically for ancient clients is good. Help the web evolve and vote with your buck, or at least with your bandwidth.
For a stable and rich web experience
download Opera 8.53Curious about the future? Check out
Opera 9 TP2 or one of the
weekly builds with leading edge technology incorporated.