Google is harassing my website for months now with false malware warnings spooking my visitors away from the site. I tried using google webmasters but they don't accept any of my submissions and I'm finally done with trying to make reason with them. So, I decided to block access to my website if user is using chrome web browser.
谷歌几个月来一直在骚扰我的网站,因为虚假的恶意软件警告会使我的访问者远离网站。我尝试使用谷歌网站管理员,但他们不接受我的任何提交,我终于完成了尝试与他们合理。因此,如果用户使用Chrome网络浏览器,我决定阻止访问我的网站。
My question is: How do I detect google chrome and disable my web page from loading if user is using that web browser? My web page is a pure html at the moment and I would like to insert a source code needed to produce such behavior. Thank you!
我的问题是:如果用户使用该网络浏览器,如何检测谷歌浏览器并禁止加载我的网页?我的网页目前是一个纯HTML,我想插入产生这种行为所需的源代码。谢谢!
Edit: Question is not a duplicate. Web browser detection is just half of the question. I want to disable web page from loading too.
编辑:问题不重复。 Web浏览器检测只是问题的一半。我也想禁用网页加载。
1 个解决方案
#1
Answering your question:
回答你的问题:
One way you can detect if the user's browser is Google Chrome it is using is.js:
您可以通过以下方式检测用户的浏览器是否为Google Chrome,它使用的是is.js:
if (is.chrome()) { // true if is Google Chrome
window.stop();
};
But you should really consider whether that is a good way to handle your real need.
但是你应该考虑这是否是一种处理你真正需求的好方法。
#1
Answering your question:
回答你的问题:
One way you can detect if the user's browser is Google Chrome it is using is.js:
您可以通过以下方式检测用户的浏览器是否为Google Chrome,它使用的是is.js:
if (is.chrome()) { // true if is Google Chrome
window.stop();
};
But you should really consider whether that is a good way to handle your real need.
但是你应该考虑这是否是一种处理你真正需求的好方法。