How reliable is IE's conditional compilation?
Could I use it instead of a browser detect to get the right XMLHttpRequest object?
| SitePoint Sponsor |


How reliable is IE's conditional compilation?
Could I use it instead of a browser detect to get the right XMLHttpRequest object?
"Never imagine yourself not to be otherwise than what
it might appear to others that what you were or might
have been was not otherwise than what you had been
would have appeared to them to be otherwise."





Conditional compilation? Eh? You mean conditional comments right?
A better solution would be to check if the object is supported. If you would use conditional comments you would need to overwrite or use a completely different solution. Which is nothing to recommend.


No, conditional compilation. I can check if the objects are supported, but conditional compilation might be the better way to do so.
"Never imagine yourself not to be otherwise than what
it might appear to others that what you were or might
have been was not otherwise than what you had been
would have appeared to them to be otherwise."





Ah yes, sorry, I see what you mean now. Well yes, I seen some Ajax tutorials using this. Personally I am not so fond of it, but I guess it's a matter of taste.
Bookmarks