Yesterday I was doing a YoGov survey (referral link in case anyone fancies signing up) and got a question which asked me to list as many web browsers as I could. I think I may have been near the tip of the long tail on that one – I wonder if anyone else included Amaya?
Archive for the ‘Browsers’ Category
IE9 on the far horizon
Posted on in Browsers, WWW.Microsoft have announced that there will be an Internet Explorer 9 (not a big surprise) and have given an early indication as to what it may include.
Headline features – faster with better standards support (in both cases playing catch up with Gecko, WebKit, Opera, etc.) and hardware accelerated graphics and font rendering which is something new and will improve the speed and quality of rendering across all sites not just ones that add new code.
No word yet on a release schedule, my personal guess would be late 2010 or early 2011 but as it’s Microsoft that could be well off.
One thing that concerns me is that the uptake by consumers may be slow. IE7 was the first release in five years and also shipped as part of Vista and IE8 ships as part of Windows 8 so users buying new machines got them automatically. With no new operating system the take up of IE9 may be slower.
When pop-up blockers go bad
Posted on in Browsers, Computers, Work.We have an web application at work that’s used by thirty or so people, many of whom are non-technical. The application runs in the browser window and is a mixture of standard HTML forms and Java applets.
The most comment “it doesn’t work” message I get from users is caused when the application displays this message:
Unspecified error invoking method or accessing property “showWindow”
The pop-up blocker built into Internet Explorer seems not to like Java applets trying to launch new browser windows. It blocks these by default even though they are “requested” by the user via a click and not launched automatically by a sneaky script. I guess IE can’t or won’t work out what’s happened inside the applet before it calls out to create a new window.
Not once have the users noticed the yellow bar at the top of their browser window informing them that a pop-up has been blocked.
I can see the problem for browser producers – if you make the notification too prominent it becomes as annoying as the pop-up would have been; if you make it too subtle it goes unnoticed when the pop-up needs to be noticed.
Compounding the issue is that Internet Explorer seems to maintain three separate lists of trusted/permitted sites for privacy (i.e. cookies), security, and pop-ups. Would a master list of trusted sites with the ability to fine tune options on a site-by-site basis as an advanced option be easier to use? Or is the interface just leading me to the wrong conclusion? Oh well, maybe IE9 will streamline things.
Oh, and don’t get me started on the Google Toolbar’s pop-up blocker…
About to get messy
Posted on in Blogs, Browsers.‘cos I’m a muppet who doesn’t have a development version of this blog, things will shortly get ugly as I’m going to be redoing al the templates, css and javascript on the fly.
Updates
- Browser Support
- As this is a personal blog support for IE6 is dropped from here on.
- Supported browsers as of today will be what I have installed on this machine – IE8, Opera 9.6, Firefox 3, Safari 3.2, Chrome 2.
- Support for IE7 will be added as and when I find it convenient to do so
- BTW, I’m not totally a muppet – I did back up the old files before I started
- Two hours later and the basics of the styling are back in place
- Nearly there, threaded comments look okay, moving onto the comments form.
- Comments form done, dinosaur pages skin done, cross-browser testing next…
- Looking good. Not a bad day’s work, comments and print stylesheet much better than before. CSS and JS reduced in size.
nervousLet’s all play the “Which IE CSS bug is it this time?” game
Posted on in Browsers.I was using this blog as an example of something the other day and noticed something was off in the sidebar when viewed in Internet Explorer. No surprise there, but when I dug a little deeper I discovered that it was only broken in IE7 – both IE6 and IE8 were okay (well, IE6 was a little off but nothing major).

Internet Explorer 6

Internet Explorer 7

Internet Explorer 8
The problem’s likely to have been there since last June which shows how little I use IE at home. Something to do with clearing floats or a calculating heights, but why is IE6 okay?
curiousStomping
Posted on in Browsers, My Life, The World, WWW.Busy day yesterday. Google releases Street View for the UK so offices all over the country ground to a halt, Microsoft release IE8 and I do a pub quiz for the first time in ages. Came fourth out of thirteen teams (and the winners had twice as many people as we did).
In a moment of madness I decided to walk from the office to the pub. According to Google Maps it was 5.2 miles (the route) and they estimated it would take 1 hour 47 minutes – I ended up doing it in 1 hour 30 minutes and lost a couple of minutes when I turned the wrong way in Peckham. I always get lost in Peckham, I don’t know why, it’s just one of those things.
The stretch along Old Kent Road is a bit grim and there was a steep bit towards the end (the clue’s in the name of Forest Hill Road). That’s the problem of walking from central London outwards – it starts flat and then inevitably gets steeper.
But it certainly gave me a good thirst by the time I reached the pub.
relaxedCross browser rounded corners, part 2
Posted on in Browsers, WWW.Picking up from my first attempt here’s a more methodical approach.
Objectives
- Buttons (both
<input type="submit"/>and links masquerading as buttons that have rounded corners. - Works in recent versions of Gecko, WebKit, Opera and Internet Explorer
- As little extra mark up as possible
- Any JavaScript used must be generic and not tied to one particular style of button, i.e. change
element.classNamenotelement.style
HTML + CSS
Let’s start with the standards based solution that works in Gecko and WebKit based browsers.
<input class="button-rounded" type="submit" value="Go"/>
<a href="#" class="button-rounded right">Go
.button-rounded {
font: bold 100%/1 Verdana, sans-serif;
text-decoration: none;
background-color: #2e4c37;
color: #fff;
border: 2px solid #fff;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
As you can see from Example 2A this works very nicely in Gecko but has a few issues with padding and line heights in WebKit. If you examine the code of the example you’ll see some extra styles to tweak the padding so that the button and the link look the same (at least in Firefox) and also to produce examples where the buttons are floated (this variation is widely found on the web and also through up some problems during testing).
Add elements via JavaScript
As prevously we’re now going to use JavaScript (in the example code jQuery) to wrap the button in a span and then insert four extra elements into that span. We also add a new class to the button itself.
if($.browser.msie || $.browser.opera) {
$('.button-rounded').addClass('wrapped').wrap(
'<span class="button-rounded"></span>'
);
$('span.button-rounded').append(
'<i class="tl"></i><i class="tr"></i><i class="bl"></i><i class="br"></i>'
);
};
.button-rounded.wrapped {
border: none;
background: transparent none;
float: none;
margin: 0;
}
span.button-rounded {
position: relative;
}
span.button-rounded i {
position: absolute;
width: 4px;
height: 4px;
background: url(corners.png) no-repeat;
}
span.button-rounded i.tl {
top: -2px; left: -2px;
background-position: 0 0;
}
span.button-rounded i.tr {
top: -2px; right: -2px;
background-position: -4px 0;
}
span.button-rounded i.bl {
bottom: -2px; left: -2px;
background-position: 0 -4px;
}
span.button-rounded i.br {
bottom: -2px; right: -2px;
background-position: -4px -4px;
}
This removes most of the styles from the button and applies them to the wrapping span – this helps a lot as spans are more predictable than inputs.
But a quick look at Example 2B reveals that the floated elements don’t seem to be in the right place anymore. We forgot that there are two classes and hence two sets of styles on these buttons.
$('.button-rounded.right').removeClass('right').parent('span').addClass('right');
$('.button-rounded.left').removeClass('left').parent('span').addClass('left');
Okay, Example 2C is a step in the right direction but there are still a number of issues. In IE the floated buttons are two wide and the inline input is missing its bottom border. In Opera the two inline examples have a problem with the location of the right side corners.
Fine Tuning Internet Explorer
Add display: inline-block; to the styles for .button-wrapped. Simple and works brilliantly, Example 2d.
Fine Tuning Opera
As the browser with the smallest market share we’ve left Opera to last and hence it’s been the victim of a few CSS style choices that have been made with IE and Firefox in mind. We could deploy some CSS hacks to feed it different styles but this time I decided to use JavaScript instead.
if ($.browser.opera) {
$('input.button-rounded').addClass('opPad');
$('span.button-rounded').each( function() {
if($(this).css('float') == 'none') {
$(this).children('i.tr, i.br').addClass('opNoFlo');
};
});
};
input.button-rounded.opPad {
padding: 1px 5px 2px 5px;
}
span.button-rounded i.opNoFlo {
right: -4px;
}
So there we are, Example 2e.
If you want a hover effect on your buttons just add .button-rounded:hover and change the background and border properties. It may be easier to change the span.button-rounded:hover i background image but it’s probably better practice to change the background-position values instead and use a single corners.png as your CSS sprite holder for both normal and hover states. (Or take the easy way out and just change the text colour as I did in the last example.)
If you have multiple styles of buttons then use contextual selectors to set different CSS whilst keeping the JavaScript common across the entire site. In a real world case I have a common style that gets changed for a few <form id="foo">.
Now for the bad news. I’ve tested this in IE 7, FF 3, Opera 9.6, Safari 3, Chrome 0.4.154.22 on Windows XP. I’ll be testing in IE 6 and IE 8b2 shortly but would appreciate feedback regarding other platforms and browsers.
Round the corner
Posted on in Browsers, WWW.That last post? Some of you may have noticed that it doesn’t work very well.
The styles applied to the button and the button’s parent element make a difference in how IE (and to a lesser extent Opera) handle the positioned elements.
My current line of attack is to use more jQuery to remove some styles from the button itself and apply them to the inserted span. For Opera, I’m looking at the SVG solution.
This time I may wait until I’ve finished testing before posting.
Cross browser rounded corners, part 1
Posted on in Browsers, WWW.Today I decided to try and build rounded corners on a button that would work in both CSS 3 compliant browsers (Gecko and WebKit based browsers, i.e. Firefox, Camino, Safari, Chrome, etc.) and also in IE and Opera.
The HTML
<input type="submit" value="Go" class="button-rounded"/>
Nice and clean.
The CSS
.button-rounded {
border: 2px solid #fff;
padding: 0 2px;
background-color: #2e4c37;
color: #fff;
font-weight: bold;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
This is enough to do the trick in the known good browsers and in any unknown CSS 3 compliant browsers. (This part of the CSS 3 spec, whilst still not finalised, is unlikely to change.)
More CSS
span.corners {position: relative;}
span.corners i {position: absolute; width: 4px; height: 4px; background: url(corners.png) no-repeat;}
span.corners i.tl {top: 0; left: 0; background-position: 0 0;}
span.corners ispan.corners ispan.corners i.tr {top: 0; right: 0; background-position: -4px 0;}
.bl {bottom: 0; left: 0; background-position: 0 -4px;}
.br {bottom: 0; right: 0; background-position: -4px -4px;}
Yet more CSS for IE (use a conditional comment or your hack of choice)
span.corners i.tl, span.corners i.tr {top: 1px;}
span.corners i.bl, span.corners i.br {bottom: 1px;}
(There’s a one pixel difference betwen the way Opera and IE draw the button, hence the branched CSS. This may not always be the case, depending on the CSS styles you use for the border but with a 2px wide border with a 4px corner radius it was the case.)
[Update] It seems that IE8 differs from IE7 in this respect. I’ll revisit this article when IE8 leaves beta.
The graphic
, a bit small, here it is ×4
. That’s all four corners in one graphic, for use as CSS Sprites in the above CSS code.
But where are these elements that this extra CSS references? They get added by JavaScript, in this case using the jQuery library.
The JavaScript
if(($.browser.msie && $.browser.version == '7.0') || $.browser.opera) {
$('.button-rounded').wrap('<span class="corners">>/span>');
$('span.corners').append('<i class="tl"></i><i class="tr"></i><i class="bl"></i><i class="br"></i>');
};
Why <i>? Because it uses the least code. If you like you can use <span> instead.
Why browser sniff? Because we don’t want to write extra code into the page for browsers that don’t need it and it’s hard to include IE and Opera but exclude FF and Safari by other means.
Remember that any browser excluded from the JavaScript and incapable of using CSS 3 will get a button with square corners. We are not excluding anyone from functionality, nor from the general design – just from one small detail.
The result
So Firefox and Safari get rounded corners via CSS. IE7 and Opera get some extra code which positions graphics over the corners of the buttons.
Still to do
IE6 has some problems with using the right and bottom CSS properties. Hence for the moment I exclude it from the JavaScript. This is what I hope to resolve in part 2.
There’s also a potential future-proofing issue – when Opera and IE start supporting border-radius this code will position the graphics over the rounded corners, which may or may not work depending on how closely their rounded corners match the ones Gecko draws (the graphic was produced from a screen shot of the corners in Firefox).
Part 2, in a few days.
The fat lady sings?
Posted on in Browsers, Computer Games, Computers, My Life, WWW.This wasn’t the post I was going to write tonight, but whilst double checking my facts (What? Come on, no on fact checks these days!) I discovered that the problem I wanted to write about was in fact limited to the one browser that I had been using to at the time – Opera.
I’ve been using Opera as my primary browser for a long time, since version 3 in early 1998. Back then it was like a breathe of fresh air compared to Netscape and Internet Explorer – so much faster, so more more secure, so many customisations possible. Subsequent releases added features that have gone on to be adopted by almost every other browser.
But in the last year or so, something has gone a bit wrong. I now find myself using Firefox to read Gmail at home (but, oddly, not at work) because neither of the two ajax powered interfaces work reliably in Opera. Likewise I post to this blog using Firefox because the plugin I use for crossposting to Live Journal breaks the ‘write post’ page interface in Opera. If I’m trying to geocode a batch of photos in Flickr then Opera will often hang or refuse to display the maps.
The problems are not consistent (as I said, I can use Gmail at work but not at home) and can’t really be pinned down to a fault with either the browser itself, the coding on the sites or my set up. It’s just a combination of all three which is making Opera increasingly unreliable when it comes to Rich Internet Applications (RIAs).
Look at the release notes for recent versions of every major and you’ll see that performance, especially RIA performance, is a major goal at the moment. Opera is rightly famed for its overall performance and speed on normal web pages but it seems to me that the performance with ajax requests is lagging behind other browsers.
Will I switch to Firefox anytime soon? I doubt it. I have ten years worth of experience with Opera – I know its quirks and secrets and it has so much that I need available straight out of the box – how many Firefox addons would I need to do the same? Is there even an addon that replicates something as simple as Opera’s “paste and go” function?
The fat lady isn’t singing yet; but she is warming up, just in case.
frustrated