0

How Do I Stop My Html From Running On A Browser

I want to know how they do it - when u open a site in UC browser for instance and you see something - Please use these browsers - this site is incompatible with your browser bla bla bla. How do they do it.

21st Jun 2019, 6:35 AM
Arch_Unique
Arch_Unique - avatar
3 Answers
+ 1
I found this somewhere in a code a while ago (I don't know whose code it was, but not mine), I'm not sure how it exactly works var msie = ua.indexOf("MSIE ");     if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))  // If Internet Explorer, return version number     {         alert("Please stop using Internet Explorer, it's a nightmare to work with and doesn't know how to browser"); //you could write some code here that prevents the code from running     } This checks if you are using internet Explorer
21st Jun 2019, 6:46 AM
Roel
Roel - avatar
+ 1
Ohkay tx very much so what i need to just do is find the user agent string id of the browser and implement it here .....
21st Jun 2019, 6:47 AM
Arch_Unique
Arch_Unique - avatar
0
Yeah I think so
21st Jun 2019, 6:48 AM
Roel
Roel - avatar