Browsing Posts in Internet Explorer

Came across this one today. The CSS styling for one of our websites in production was completely missing. At first I thought we'd disabled stylesheets or tripped up on some quirky setting in IE7, but it turns out the 'cause of all our problems was an empty base href tag. After a quick bit of scouting on the internet I was lead to article that went on to describe :

BASE Element--Internet Explorer 7 strictly enforces the BASE element rule, as documented in the HTML 4.01 standard. We no longer allow BASE tags outside of the HEAD of the document. The standard specifies that the base element must appear within the head of the document, before any elements that refer to an external source.

After checking the base href I realised it was empty. I made some quick adjustments to the PHP to get the tag to correctly populate and tada ! Worth remembering !

I ran across a little problem today where an application written for our website, and running the Google Maps API was 'causing the browser to crash, but as always with 'quirks'...  only in IE6!

After some time fiddling around on the internet and reading quite a few interesting articles about the stability of the Google Maps API within IE6 I found a few things listed as the most common causes : (

  • Script position. Make sure the Google Maps API script is called in either the head of your HTML or at the very end. Embedding within HTML should be avoided.
  • Make sure a valid doctype is declared. Remember the xmlns="" xmlns:v="urn:schemas-microsoft-com:vml" attributes need to be added if you are presenting polylines in mapping applications
  • Ensure you have set a size for your google_map DIV
  • In your javascript make sure that the variable you assign new GMap2(); to is unique. Commonly it is assigned as var map = new GMap2(); make sure that variable is unique.
  • Good practice is to ensure your document W3C validates. Clean (X)HTML is a great place to start.

Other things to be aware of. In the script src tag Google passes the major script version into the query string. BUT... this can be, although not recommended, also be used to pass in minor version stamps too. i.e.

For a list of API Version Changes refer to this Google page.