I strongly recommend against doing this because:
a. first off, the reasons cheerios stated above are *very* valid and I would recommend listening to them
b. many browsers other than ie/netscape, for this very reason, have plugins/options to fake useragents, so the website thinks they are IE/netscape even when they are not. I know this works with server-side browser detection, not too sure about client-side (eg. javascript).
c. netscape uses the Mozilla gecko rendering engine. So do a lot of other browsers (Mozilla, Mozilla Firebird, Konqueror, Camino), so really you gain nothing by blocking them. Also, a lot of browsers use IE with a different gui (not sure if they change useragents or not though). Apple's safari browser apparently renders very well as well - do you want to alienate many macosx users?
With this in mind, if you still want to do it, go ahead, it's your site. Google for "javascript useragent" - it should give you the stuff you want.
|