Multi-Browser Viewer Logo

With IE Rapidly Losing Marketshare, Cross Browser Testing is No Longer a Luxury

clock May 17, 2010 03:30 by author jamesmelvin

After many years spent building content management solutions for many of the Top 100 countries in the world (Including a stint working for Microsoft), I find it interesting how little validation goes into ensuring sites are cross browser compatible. Most developers are aware that testing the cross-browser compatibility of a website is something they should do, and although we all have own preferred browser, it is a given that your website visitors will probably not be using the same web browser as you. Cross browser testing is a type of compatibility testing designed to ensure that a web application behaves correctly (sometimes identically) in several different browsers and/or browser versions.

In the 90’s, there was a stage where Microsoft had over 95% of the browser market and no one cared about ensuring a site worked correctly in multiple browsers. The slow, steady decline of Microsoft Internet Explorer continues apace with the Internet Explorer charting another market share low in April with 59.95 % of the browser market–down from 60.65% in March and 67.77% from the same time last year. Clearly, IE 8, while largely well-received, hasn't done much to reverse the overall decline of Microsoft’s browser. Hard to believe that IE held an estimated 95% of the browser market in 2003, isn't it?

 

 

This is the first time IE’s share has ever fallen below 60%. What this clearly shows is that cross browser testing is now more important than ever before. Ensuring your site works on Internet Explorer means that at best, you are confident that your site works on 6 out of 10 visitors browsers. This of course is also incorrect because as any developer can tell you, IE 6, 7, 8 and even the IE 9 preview are vastly different rendering engines altogether.

So looking at the fact that Internet Explorer 8 has 24.66%, Microsoft Internet Explorer 6 17.58% and Internet Explorer 7 12.50%, even ensuring you reach around 6 out of 10 customers means you need to have at least done cross browser testing on 3 different browsers.

 

Meanwhile, Mozilla’s Firefox, Apple’s Safari and Google’s Chrome all made small gains at Internet Explorers expense. Chrome posted the largest gain, rising 0.6 points to 6.73%. Firefox’s market share rose 0.07 points to 24.59% and Safari’s increased just 0.06 points to 4.7%, a surprisingly under whelming gain for a browser that ships not just on the Mac, but on the iPhone, iPod touch and now the iPad as well.


So assuming that you built your website to reach the largest possible market, or if you are redesigning an existing website, you could look at the website stats for your website and see which browsers (and operating systems) the past visitors have been using. Understand, this is not a recommendation to ignore the less frequently used browsers of your visitors, but an exercise to show you what browser your website visitors are using, this would be a good place to start.


A safe policy to have is that each web page is viewable in as many browsers possible. The best way to do that is to ensure your code is as W3C standards compliant as possible. Of course you can use Multi-Browser Viewers Html validator to help there. (A shameless plug of one of our more powerful but obscure features).

So how do you make a Site Cross-Browser Compatible and is screenshot testing enough?

Firstly, to create a cross-browser compatible website ensure you follow the following simple standards:

   1. Use only standard compliant coding.

   2. Don't use browser specific (proprietary) HTML tags and features. (These only work in the browser they were created for and may even break your web page when viewed in another browser.)

   3. Validate your web pages.

  •       Validate your HTML/XHTML coding using the Multi-Browser viewer’s  or the W3C’s free validation service.
  •       Validate your cascading style sheets using the W3C free validation service.

 

 4. Given the interest in HTML 5 and the lack of interest in XHTML 2, develop HTML 4.01 Strict and follow these practices: (which are recommended in HTML 4, and required in HTML 5 and XHTML 1.1)

  •   All elements and attribute names must appear in lower case,
  •   All attribute values must be quoted,
  •   Non-Empty Elements require a closing tag,
  •   No attribute minimization is allowed,
  •   In Strict mode, all inline elements must be contained in a block element.

 

Some people may have the "You can't please everyone" attitude. Yes, your site will look different in each browser because each one interprets the coding differently. The goal with cross-browser compatibility is to make your site viewable in the major browsers available and have the pages render correctly. One thing that will drive visitors away is a site that doesn't work in their chosen browser. Of course you wouldn’t be reading this blog if that was the case so we now get to the steps I tend to follow to ensure compatibility.

      Test browser screen shots to identify initial layout issues. (Don’t just rely on screen shots as this is only a visual guide.) It doesn’t mean your website works. It only means it looks okay.

Test actual browsers to ensure that all menus, css, post backs etc. work. Remember that just because your site works in IE 8 doesn’t mean it will in IE 6.

Test mobile devices.

Cross-browser testing is a hassle. Most of the time you can follow standards and get a decent looking website working cross browser, but there's always variations. All browsers have their quirks and older IE's have more than their fair share.
As I see it, there's basically two sections to cross-browser testing.

 

Pros

Cons

Breadth
ScreenShot Service

Get screenshots of your site on multiple browsers and platforms

No interaction with the browsers, no way to debug interactions.

Depth - Interaction
Virtual Machines

You really get to see how your site looks and works on many browsers.

Typically, you have to maintain a bunch of Virtual Machines, or a be aware lot of browser installations. Please note that this is not the case with Multi-Browser Viewer

Neither are mutually exclusive and you really do need both to ensure cross Browser computability. Having a site look the same is the start, but ensuring the site actually works is certainly just as important, if not more important.  

Hope that helps.

James Melvin

 

 


Location: PostList


Browser ballot for XP, Vista and Windows 7 hurting IE market share

clock May 14, 2010 03:58 by author

A couple of months after the browser ballot has been included in installs of Windows XP, Vista and Windows 7 has already resulted in Microsoft’s IE browser losing even more market share to its rivals, according to web stats firm StatCounter.

In France, IE usage has dropped by 2.5 percent, Italy by 1.3 percent, and the UK by 1 percent. Browser developers Opera and Mozilla have reported strong growth within Europe, with Opera claiming that downloads have tripled since the ballot was introduced, and a Mozilla spokesperson claiming, "We have seen significant growth in the number of new Firefox users as a result of the Ballot Choice screen”. As the ballot is rolled out across the rest of Europe, Mozilla expects further gains to be made.

The ballot isn't universally popular. Although 12 browsers are offered, only the top five are immediately accessible. The remaining seven are only visible after scrolling horizontally. As the seven minority browsers expected, their presence in the ballot has done little to boost their market share. A spokesman for the Flock browser said, "To date, new downloads of Flock originating from the browser choice screen have only contributed marginally to growth in overall downloads. This is also the case for the other browsers not on the main screen."

The remaining browsers have petitioned the EU to get the ballot changed. For its part, Microsoft still maintains that the browser ballot is compliant with the EU's demands. With some 200 million European users due to be shown the choice screen, and the benefits of being included becoming increasingly clear, time is clearly of the essence for the seven smaller browsers.  What is also clear though is that Microsoft IE is certainly not the defacto browser of choice anymore and testing on multiple browser’s and version is certainly going to get more complex as users get more options.


There are 12 browsers on offer:

  • Avant
  • Chrome
  • Firefox
  • Flock
  • Green Browser
  • Internet Explorer
  • K-meleon
  • Maxthon
  • Opera
  • Safari
  • Sleipnir
  • Slim

Location: PostList


How to Prevent Cross-Browser Compatibility problems

clock October 12, 2009 10:30 by author

Many of the support queries we receive relates to how can you ensure that your web page design is cross browser compatible. In other words instead of going through the entire development process, then testing my design in different browsers, what standard practices should I follow to ensure web site will render correctly once it is completed.

Well, unfortunately there is no foo proof method off course, but here are a few helpful tips/best practices that should get you pretty close at least.

First off - What is a web browser??

Simple question I know, but many people still get confused to exactly what a browser is and how it functions. An Internet browser (IE, Firefox, Safari, Opera and Google Chrome for example) is nothing more than a software application, similar to a text editor, anti-virus software or a computer game. Some of the confusion comes in because IE is embedded or very much part of the Microsoft Operating system(although Microsoft is starting to clearly separate the browser from the OS). A browser is NOT a search engine and it is NOT a website. A web browser renders/displays web pages that you visit/browse. Web browsers use different rendering engines, which means HTML, CSS and other code gets interpreted and thus differently by different web browsers. And that of course where the problem lies for website owners and web designers....Sure there are supposed standards like the W3C and such, which are supposedly followed by everyone, but for various reasons, which fall outside the scope of this article, the problem remains.

Cross-Browser Compatibility Best Practices

1. Know you web user - The first thing you need to do is understand who your customers and/or web browsers will be. In other words if you are developing for a closed environment like an intranet, then maybe 90% of your users will be Internet Explorer based or if it a design firm that only uses Apple Mac machines then maybe all the traffic is exclusively Safari. Bottom line is make sure you know what the most important browser demographic is for your web application. If you have no idea, industry browser usage statistics are available in the blog post here. I would recommend however that you use a tool like Google analytics to determine the usage statistics for your own site, as the numbers can vary substantially from target market to target market.

Why is it important to know what web browsers are most important for you? Well, it helps you ensure that you optimize your design and/or development for that particular browser and if you do have a cross-browser compatibility issue, you'll know exactly how many users are affected by it.

2. Doctype and standards compliance HTML/CSS - The structure of a web page is defined by markup language standards (HTML, XML and XHTML). The DOCTYPE descriptor tells the browser what document type definition to use in validating the structure and how strict to apply validation rules. The doctype tag is the first tag at the top of a HTML page. To ensure your page is cross-browser compatible it recommended to ALWAYS USE STRICT DOCTYPE and code your web page accordingly. This is fairly easy with new pages, but could be a nightmare for pages that have been developed over a long time, which might need to be re-coded or migrated. For more information about doctype's visit w3schools.

3. Avoid resizing images using CSS or HTML Code - we've all done it. An image doesn't fit the way it should, and instead of resizing the image in an image editor, we use the quick and dirty method, setting the width and height in code. Avoid doing so, IE is especially bad at resizing images in code, usually making the image look jagged edged or squashed. If you have to resize using code for whatever reason, try using the -ms-interpolation-mode: bicubic; CSS switch. It supposedly reduces the jaggedness.

4. Use a CSS reset at the start of your CSS - If you site relies heavily on CSS then it is highly recommended to reset/zero value your CSS. Yahoo developer tools have a helpful CSS reset file that you can use as well as some other helpful information. basically the reset file doesn't necessarily ensure browser compatibility, as much as it it ensures that your code renders the way it's supposed to, removing that extra line break or padding that you know you didn't include, but yet is displayed on your page.

5. Resize text as percentage - Size all your document text as a % within the body, and as em’s throughout the HTML page. This also is also good for accessibility as much as for browser cross compatibility. A good article on text sizing is available here.

6. Font rendering - Use -moz-opacity:0.99 on text elements to clean up rendering in Firefox, and text-shadow: #000 0 0 0 in Safari - Safari 3+ has an issue with the way it renders light type on a dark background. Some would argue whether this is good or bad, but there’s a way to make it appear lighter.
Easy fix.

You need to add this to your code.

p {text-shadow: #000 0 0 0;} 
Where #000 is your background color. You will probably have to be more specific with the elements you select.
It is not recommended to use this fix on the body tag.
Other elements you might need to fix are the li, dt, dd, blockquote etc. Use this on any text element you want to appear ‘thinner’

To make this fix in Firefox, you use the opacity fix:

p {-moz-opacity: 0.99;}

You need to be careful with this fix, as it will break any Flash element that it touches in Firefox. There appears to be no workaround for it.

7.  Font Selection - Try use common fonts that you know are available in most opiating systems - For example Lucida have been known to render pretty badly in Internet Explorer, while rendering pretty well in Safari. Rather just avoid it and stick to fonts that are common to all operating systems.

8. Avoid using transparent PNG images - Internet explorer 6 does not support alpha transparency in PNG images. There are a few work arounds, which you can simply Google, most of them have a few side affects. One that I have used before is Twinhelix.

9. All layout divs that are floated should include display:inline and overflow:hidden - When you have a standard layout, with floats sitting next to each other, with set widths, but an image or long string of text is longer than this width, the layout could break in Internet Explorer 6. If you place overflow:hidden; into the layout divs, the layout shouldn't break.

10. Containers or container div's should have overflow:auto or overflow:hidden and trigger hasLayout via a width or height - This is to avoid circumstances where a div container does not wrap around all the containing div's like its supposed to. You can always test it by using a background image on the container.  You’ll also need to make sure hasLayout is triggered in Internet Explorer 6. You can do this by specifying a width or height. If you don’t have a width in your div container, you can use height:1% to trigger it, or zoom:1; if you can’t afford to give it a height.

11. Avoid using the brand new CSS 3 selectors - many of the new CSS 3 selectors aren't supported by Internet Explorer 6.  For a full list of supported selectors, check out evotech.net’s post on browser css selector support.

12. Test, Test and Test - test your site for cross-browser compatibility using the actual browsers and virtual machines or by using software such Multi-Browser Viewer. I would always recommend you test in the actual browsers like Internet explorer, Google Chrome, Firefox and opera when you first launch your site and use a service like Multi-browser Viewer to continually test your site over time for any major problems.

I would like to thanks ADM blog and webappers, which I also used for reference for this blog entry.


Location: PostList


About Multi-Browser Viewer Blog

The Multi-Browser Viewer blog pages feature Cross-Browser compatibility tips, tricks and stats. As well as
Multi-Browser Viewer related FAQ's, Support documentation and release notes.

Please feel free co comment and ask questions.

RecentComments

Comment RSS

Sign in