Suggested BP for BP 2 : Use Javascript reflection to check for available functionalities avoiding the user agent string

BP

Use Javascript reflection to check for available functionalities 
avoiding parsing the user agent string

The user agent string cannot be trusted while trying to figure out what 
are the script functionalities available

How to do it (example)

Use Javascript Reflection and if statements

if(window.ActiveXObject) {
   // Instantiate using new ActiveXObject
}
else if(window.XMLHttpRequest) {
    // Instantiate using new XMHttpRequest
}

Received on Tuesday, 26 February 2008 15:13:16 UTC