MS Urging Developers To Prep For IE 7
Mike Savior writes "Eweek has a story stating that Microsoft is telling web site developers to prepare their sites for IE 7. From the article: 'One area that Microsoft has clearly articulated as being one in which developers can start work now to prepare for IE 7 involves the UA (user agent) string. First discussed in the company's Weblog in April, the code change prompted a reminder on Wednesday to developers, telling them that Microsoft continues to run across Web sites that are not expecting Version 7 of the browser, and urging them to test their UA strings. '"
Invalid HTML/XHTML..... Check
Invalid CSS.... Check
READY!
I hope.
The headline should read:
MS informing developers that IE7 will not be standards compliant, get hacks ready now
Software Wars
Say you want to get an element with a particular id attribute. Older versions of Internet Explorer don't support document.getElementById() but do support document.all. Newer versions of Internet Explorer support both. Other browsers sometimes support document.all and sometimes support document.getElementById.
The bad way of sorting this mess out is to try and figure out which browser is being used, and keep updating your detection code on every website you do every time a new browser is released.
The smart way of sorting the mess out is to not care what browser is being used, but simply check to see if document.getElementById() and document.all exist. Example:
This way, somebody using a browser you've never even heard of can visit your site and have things work.