Skip navigation.

exploreopera

| Help

Sign up | Help

Confessions of a Web Developer

Posts tagged with "browsers"

Looking at Opera 9.5 alpha

, ,

I've mostly been away from this site since June, but I'm following the news... and I've downloaded and played around with the new Opera 9.5 preview. Over at K² Ramblings, I've posted my First Thoughts on Opera 9.5.

5 things I want to see in Opera

, , , ...

I've been away from this corner of the web for a month or so, focusing on the upheaval in comics fandom with The Flash, so I don't know if anyone's tagged me for Opera Watch's 5 things I’d like to see in Opera meme.

So I'm just going to throw my hat in the ring before I head off to Comic-Con tomorrow.

1. Inline spell-check and other improvements. Yeah, on-demand spell-check is available, but it's so much more convenient to have problem words highlighted as you type. I'd also like to see an "Ignore All" button, in case I don't want to teach the spell checker a word that appears repeatedly in a post. And it would be great if it would recognize and skip URLs and HTML/BBCode tags. I get really tired of hitting "Ignore" on things like href and http, but I don't want add them to the dictionary in case I accidentally type them in the body of a post.

2. Apt and Yum repositories for Linux. Opera's Linux offerings break down to about half a dozen binaries, which are available in 3 forms: .rpm, .deb, and tar.gz. Opera doesn't have to provide a separate repository for each distribution, just one yum repo for each .rpm, and one apt repo for each .deb. Once the user installs the repository, the OS's own update system will be able to take care of updating Opera. (As an example, see what Adobe has started doing with its yum repository for Flash.)

3. Delete all cookies on close with site-specific exceptions. I've given up trying to figure out what overrides what in Opera's cookie settings. What I'd like to do is just wipe everything on exit, with a list of sites that are allowed to keep cookies across sessions. Firefox does this with the "Keep until... I close Firefox" setting. I can sort of manage it in Opera by telling it to delete all new cookies when exiting, but it's more of a pain to add a new site. Instead of just adding it to the list of exceptions, I have to disable the option, log in to the site, then re-enable it. And that's assuming the site doesn't have to update the cookie later on.

4. Experimental CSS3 properties, especially box-shadow and border-radius. I know Opera 9.5 is supposed to have a bunch of CSS3 capabilities, but so far they've been cagey on just what's on the list.

5. Wii emulator mode for the desktop version. I'm not likely to pick up a Wii, but I'd like to make sure my websites look right. Small-screen rendering is great for simulating mobile devices, and the Opera Mini simulator takes care of that platform, but I can only go on descriptions for the Wii version.

I'm not big on the whole tagging thing, so I won't tag anyone else. (Besides, most of the people I could think of have probably already posted by now.)

(On the subject of Comic-Con, I'll be posting about it at my main site, K-Squared Ramblings, and guest-blogging at Comics Should Be Good.)

Safari on Windows: What effect will it have on Opera?

, , ,

So, Apple just dropped a bombshell: the Safari web browser is now available for Windows. I've posted some general reactions at K-Squared Ramblings as to how it will benefit web developers and users overall. The most obvious is that Windows-only web designers will no longer have an excuse for not testing in Safari, which might help break the two-browser mindset.

But what about Opera, specifically?

I remember when Apple first announced Safari for the Mac, Opera was very upset that Apple had decided to go their own way instead of licensing Opera as the new default browser. In retrospect, both sides were right: Apple was right to choose something that they could maintain themselves, without being dependent on an outside provider. (I guess they'd learned their lesson from Internet Explorer.) Opera was right that they lost a golden opportunity: as the default browser on MacOS, Safari has since become the most-used browser on that platform and the third-most-used browser overall, surpassing Opera's marketshare.

So there's certainly a risk that Safari on Windows could surpass Opera's users. However, there is one significant difference: Safari is not the default browser on Windows. It's hard to tell how much of Safari's uptake on MacOS is due to it being the default, and how much is due to people actively liking it. Personally, I have Opera, Firefox, and a half-dozen other browsers on my PowerBook, but when I fire that box up, I generally use Safari.

If you look at the functionality available in a base install, from simplest to most complex, it probably starts with Safari, runs through Firefox and IE, then finishes with Opera. Firefox has a wide array of extensions available -- in fact, it's pretty much known for them. Safari isn't nearly as extensible. You can't install something that will add mouse gestures, for instance.

I suspect that, at least at first, the audience for Safari on Windows will consist mainly of the following groups:
  • Web Developers
  • Dual-platform users who are used to Safari on Mac
  • People who just want a basic browser and don't want bells and whistles, but don't want IE for some reason

If anything, I think Firefox has more to worry about than Opera. For every Firefox user who tricks out his browser with every 1337 extension he can find, there are probably many who just wanted something more stable than IE, or faster than IE. There's a vocal faction of Firefox users who are frustrated with its performance. I don't know why they haven't jumped ship to Opera, but depending on how much memory Safari uses when it gets out of beta, it might prove a threat on that front.

Further reading:

On broken HTML

, , , ...

From time to time the idea is put forth that Opera needs to start dealing with bad code. There are two problems with that view:

  1. Opera already deals with quite a bit of "bad code" (but there's always room for improvement)
  2. Just dealing with bad code isn't enough: you have to deal with it the same way someone else does.

#2 is the tough part.

The rules for dealing with good code are, for the most part, specific. If you encounter well-formed HTML, you can be reasonably sure you know what the author meant. But there are very few rules for dealing with bad code. Trying to "deal with it" means trying to guess what the author meant, and sometimes different assumptions are equally as likely.

Example:
<p><b>Here's some text</i> and here's some more.</p>

Did the author close the non-existent italics by mistake, meaning to close the bold? Or did he open bold by mistake, intending to open italics? Or is the closing italics tag left over from copy-and-paste? Depending on what assumptions the browser makes, it should display it as:

Here's some text and here's some more.

Here's some text and here's some more.

Here's some text and here's some more.

And that's just a simple example. It gets wilder when you throw in issues like inline vs. block elements. A paragraph should never appear inside a tag for text formatting, like bold or italic. By all rights, starting a new paragraph (or more precisely, ending the previous one) should also revert to plain formatting. But a lot of old pages expect the formatting to continue into the next paragraph, because way back when, a P tag was a double-line break, not a container.

Now, suppose that Browser A always makes the first assumption, and Browser B always makes the second. If someone tests their code in Browser A, and it happens to be what they want it to do, they won't necessarily notice that their code is broken. The result: the site looks wrong in Browser B, and the page author -- who thinks the page is fine, since he tested it in Browser A -- blames Browser B.

Multiply that scenario by millions of pages and you have a large chunk of the web as we know it today.

So the solution isn't just to "handle bad code." It's to handle that bad code in the same way that the dominant browser handles it. And since there's no document you can look to for guidance, that means taking every possible chunk of bad code, running it through the other browser, and seeing what it does to it.

And there are a lot of ways to break code!

Even Microsoft did this back when IE was new. At the time, lots of people were writing broken code and testing it by seeing whether it looked right in Netscape. So IE had to make the same assumptions Netscape did on certain things. Once IE became established, they diverged.

Some relevant articles:


I plan on refining this post from time to time.

Yahoo expands support for Opera 9

, , ,

Yahoo! just announced an update to their system of Graded Browser Support. This is the scheme where they classify browsers according to capabilities, age, user base.

  • A-Grade browsers get full support. Yahoo does extensive testing, and tries to make services work well in them.
  • C-Grade browsers are known to have problems, and get sent "lowest-common denominator" code. When last checked, the only C-Grade browser was IE 5.0.
  • X-Grade browsers are everything else. They get the same code as A-Grade browsers, but Yahoo doesn't do any testing on them.

A few months ago, they added Opera 9 on Windows XP to their A-Grade list (replacing Opera 8).

This time around, they've made several interesting changes:

  • Expanded A-list support for Opera 9 across all operating systems they support, including Mac OS and older Windows releases.
  • Added IE7 and Firefox 2 to the A-list.
  • Dropped IE 5.5 and Firefox 1.0 from A-list to X-list.
  • Dropped Netscape from A-list to X-list.

The first item is most significant for Opera users, because it brings Yahoo's official policy on Opera support up to the same level as their support for Firefox.

The new chart only shows A-grade browsers, so it's not clear whether IE 5.0 is still supported at C-grade level or dropped to X-grade like IE 5.5. This may reflect support at Microsoft, which maintains support for IE 5.0 on Windows 2000, but not IE 5.5. You can't even download IE 5.5 from Microsoft anymore. You can get IE 5.0 by installing Windows 2000, and you can update to IE6 or download the installer, but you can't update to or download IE 5.5.

The fact that they've dropped Netscape is interesting, and represents another nail in the coffin of the web's former dominant player. Of course, the real action moved from Netscape to Mozilla years ago.

Browser Discrimination hits IE7

, ,

I just read an interesting post from Microsoft's Internet Explorer team on The IE7 User-Agent String. This statement in particular illustrates a problem not unfamiliar to Opera users:
There are a few remaining sites which fail to recognize IE7 because they are performing exact string matches to look for specific IE version strings. Those checks will need to be removed or updated to accommodate IE7.

Yes, you read that correctly: there are websites out there using bad browser sniffing code which will send the wrong code to Internet Explorer 7. In fact, they go on to say that they've released a tool which will let IE7 pretend to be IE6!
To enable you to workaround any remaining sites that block access to Internet Explorer 7, we developed the User Agent String Utility. The utility comes in the form of a small executable that opens an IE7 instance that sends the IE6 user agent string. It also provides a mechanism for you to report problem web sites to Microsoft so that we can follow up with the affected site owners.

I'll admit to a certain amount of schadenfreude, but it also points up just how bad a strategy browser sniffing can be when done thoughtlessly: It effectively builds an expiration date into your website after which even the browser you designed it for will run into problems.

Know Your Enemy

, , , ...

There's a lot of misinformation out there about various browsers. Opera can/can't do this. Firefox can/can't do that. There's only so much you can do to promote one product when you only know rumors or outdated facts about another.

If someone told you that Firefox was better than Opera because it doesn't have ads, you wouldn't take them seriously. You'd know the ads have been gone since last year, and you'd wonder what else they have wrong. Similarly, you won't convince a Firefox user that Opera is better because you can reorder tabs (you can, starting in Firefox 1.5). And you won't convince an IE fan that Opera is better because of tabs and a built-in search box because they'll tell you that IE7 has both.

When you're trying to convince someone that X is better than Y, and they know Y very well, you'd better know Y well enough not to make statements that the other person knows are false. When you do, you'll lose credibility, and the rest of your argument -- the part you do know well -- will suffer for it. (I suspect a lot of software flame wars get started this way!)

So here's my suggestion: If you want to promote Opera, go and download Firefox 1.5 and (if your OS will run it) the IE7 beta. If you're on a Mac, fire up Safari. Mess around with them enough that you're familiar with how they work, what you can do with them, and how they handle your favorite web pages. That way the next time you face an IE fan (to the extent that IE has fans), or a Firefox fan, or a Safari fan, you'll be armed with accurate information.

As for the post title -- I don't think it's necessary for the major browsers to be enemies. I think there's plenty of room for cordial competition rather than a cutthroat struggle. But "Know Your Enemy" is a better attention-getter than "Familiarize yourself with the competition." :wink:

Conditional Opera Banners Using JavaScript

, , , ...

Posting an Opera button on your website or blog is a great way to encourage people to try out the browser -- but what if the visitor already uses Opera? It shows solidarity, but what if you could show them something else, something that is new to them?

You might want to replace your regular Opera banner with an ad for Opera Mini. Or show them another graphic of your own design. Or maybe not even a graphic, maybe post some sort of message, like "Opera spoken here!" or "Welcome, Opera visitors!"

It's relatively simple to do this in PHP, or ASP, or some other server-side script...but sometimes you have to stick with static HTML. Well, client-side JavaScript can replace chunks of your page, and here's how to do it.

1. Put the following script in a file called operalinks.js:

function replaceOperaLink(linkID) {
if(linkNode=document.getElementById(linkID)) {
if ( 0 &lt;= navigator.userAgent.indexOf('Opera') ) {
var newButton=document.createElement('span');
newButton.innerHTML = '&lt;a href="http://www.opera.com/"&gt;Glad to see you\'re using Opera!&lt;/a&gt;';
var parentNode=linkNode.parentNode;
parentNode.replaceChild(newButton,linkNode);
}
}
}


For the innerHTML section, you can plug in a new link and banner, or a special message, or anything you want. (Just make sure that you put a backslash (\) in front of any apostrophes you use.)

2. Put a unique ID in the tag for your regular Opera button. Use the outermost tag that you want to replace. For example, let's start it off with this:
&lt;a id="OpLink" href="http://www.opera.com"&gt;Download Opera!&lt;/a&gt;


3. Load the script in your document's <head> section:
&lt;script type="text/javascript" src="operalinks.js">


4. Call the function in the body onload event using the ID you chose in step 2:
&lt;body onload="replaceOperaLink('OpLink')">


When the page loads, the script will check the visitor's browser. If it's Opera, it'll replace the banner with whatever message you chose in step 1. It's compatible with both HTML and XHTML, and you don't need to worry about using <noscript> tags to make sure the banner still shows up for people with JavaScript disabled.

The Alternative Browser Alliance

,

I'm working on a new browser switch site, with a bit of a twist. It's promoting all alternative browsers (Opera included, of course!), kind of like Browse Happy, but a bit more inclusive and aimed at a slightly different audience.

The idea is that a diverse browser "market" -- one with three or four major browser suppliers all competing with each other -- is the best way to maintain innovation and security. Anyone following the classic browser wars, the lull in IE development, and the sudden appearance of IE7 can see the difference competition makes for innovation. As for security... If someone can hit 90% of the world's computers by hitting IE on Windows, we're in trouble. But if they have to hit 30% each on IE, Firefox, and Opera, and even those are split among Windows, Mac and Linux, it's a lot more effort for the bad guys.

Anyway, here's the first (public) draft of the Alternative Browser Alliance. At this stage I'm looking for all kinds of feedback. Layout, message, is it too wordy, too vague, too specific, etc. Please take a look and let me know what you think!

Thanks!