www.cksu.com is one of the site we’re currently working on to create Internet Explorer 8 unique experience via add-ons (web slices, accelerators, …). CKSU is a community site for all students and alumni of King Saud University in Riyadh, Saudi Arabia. This site is simple but yet effective and popular (ranked 275 on Alexa.com for Saudi Arabia), and have a number of sections like portal, publication, blogs, libraries, etc. One important section (or actually the “one”) is the forums which is powered by vBulletin, the famous application for building web forums.
The first thing that hit us was the fact that this site is was not rendering correctly on IE8 and had some compatibility issued. Due to an error in some java scripts, some of the images where not displaying. It was actually annoying and caused some to switch to other browsers!
The error message is saying: ‘_gat’ is undefined
Seeing the source of the page, you can directly spot that this script is used for Google Analytics to collect stats of page views. Digging around for this error message in the Internet lead to a simple solution which is basically to use try/catch statement in the java script. This is actually according to the guidance from Google Analytics to avoid any error messages.
So, by spotting those statements and surrounding them with try/catch, the whole issue was gone!
The original code causing the problem:
1: var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
2: pageTracker._trackPageview();
The fixed code using try/catch:
1: try {
2: var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
3: pageTracker._trackPageview();
4: }
5: catch(err) {}
Once the developer of the site has done so (I don’t have access to it
), the issue immediately disappeared and the page loaded without errors, which caused the images of the site to display properly.
Stay tuned for the add-ons to be built for CKSU community portal which will deliver great experience for the users of Internet Explorer 8.
It’s worth mentioning some of the resources available to help identify compatibility issues with Internet Explorer:
- Web Site Troubleshooting Guidance: Learning to identify and resolve compatibility issues like the Internet Explorer team, and from this whitepaper you’ll identify two very good tools to help with identifying compatibility issues:
- Microsoft Expression Web SuperPreview for Windows Internet Explorer, or use Expression Web SuperPreview to enable debugging for FireFox vs. IE.
- Fiddler, a web traffic capture tool that greatly helped me do the test and fixing without having access to the server. I loved the feature where you can tell it to load a local page (the modified version on my computer) whenever the browser requests the problematic page from the web.
- more information and guidance on Internet Explorer Compatibility Center on MSDN.