This is probably a simple question, and I'm slightly embarrassed to ask it, but I've been working with this chunk of JavaScript ad code for a while and it's bothered me that it's never really made sense to me and is probably out dated now with modern browsers. My question is, do we need to check for browser types still, and what is that second bit of script doing?
<script type="text/javascript">
document.write('<scr' + 'ipt src="" type="text/javascript"></scr' + 'ipt>');
</script>
<script type="text/javascript">
if ((!document.images && navigator.userAgent.indexOf('Mozilla/2.') >= 0) || navigator.userAgent.indexOf("WebTV")>= 0) {
document.write('<a href="">');
document.write('<img src="" border="0" alt="" /></a>');
}
</script>
I'd like to clarify that I'm actually calling someone some ad code, so while I could check for browser types, that would really be the responsibility of the keeper of the code. I'd love it if I could get this into jQuery - but I'm having trouble with the call (see my other post below).
What I was wondering is, do I still need to check for these browser types?
Cheers,
Steve