SafariFollowing up on my previous post, 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.

This post originally appeared on Confessions of a Web Developer, my blog at the My Opera community.

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.

*This post originally appeared on Confessions of a Web Developer, my blog at the My Opera community.

There’s a lot of misinformation out there about various web 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.

Opera users: 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.

Firefox users: If someone told you Opera was better than Firefox because Firefox won’t let you reorder tabs, you wouldn’t take them seriously. You’d know that Firefox 1.5 did just that, and you’d wonder what else they have wrong.

And neither of you will 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. If you want to promote Firefox, go and download the Opera 9 beta. Either way, try out the IE7 beta (if your Windows version will run it) or fire up Safari (if you’re on a Mac). 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 an Opera 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.” 😉

*This post originally appeared in two slightly different forms on my blog Confessions of a Web Developer at the My Opera community and on my Spread Firefox blog.

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 <= navigator.userAgent.indexOf('Opera') ) {

var newButton=document.createElement('span');

newButton.innerHTML = '<a href="http://www.opera.com/">Glad to see you're using Opera!</a>';

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:

<a id="OpLink" href="http://www.opera.com">Download Opera!</a>

3. Load the script in your document’s <head> section:

<script type="text/javascript" src="operalinks.js">

4. Call the function in the body onload event using the ID you chose in step 2:

<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.

*This post originally appeared on Confessions of a Web Developer, my blog at the My Opera community.