Impossible to do - not reliable and cross-browser (FF, IE, Chrome, Opera) in any case.
Browser hacks work in IE and FF, but there is a deeper problem: what are you trying to achieve? Limiting this user experience does not bring you anything (they already have their own valuable code, otherwise they will not see the page) and annoys users.
source share