About the two scope of the page authorization of the difference, this article is mainly to share with you to restrict the page can only be opened in the built-in browser instance method, hope to help everyone.
List Contents
2.
<script type= "Text/javascript" > //The useragent of the browser is matched in regular, without the unique identity of the other browser var useragent = navigator.useragent; if (Useragent.match (/micromessenger/i) = ' Micromessenger ') { //Here warning box will block the current page continue loading alert (' This visit has been banned: You must use the built-in browser to access this page! '); The following code is forcibly closing the current page with JavaScript var opened = window.open (' About:blank ', ' _self '); Opened.opener = null; Opened.close (); } </script>
The front end is best not to use UA to determine whether it is a built-in browser, because it is too easy to forge. This determines if (typeof Weixinjsbridge!== "undefined") { return true; }