-4

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.

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!

Edit: Question is not a duplicate. Web browser detection is just half of the question. I want to disable web page from loading too.

Tracer
  • 2,544
  • 2
  • 23
  • 58
  • Duplicate http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser – TomSlick May 13 '15 at 20:02
  • It's not a duplicate. Detection is just half of the question. How do I stop page from loading if I detect chrome? – Tracer May 13 '15 at 20:04

1 Answers1

4

Answering your question:

One way you can detect if the user's browser is Google Chrome it is using 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.

Rafael Eyng
  • 4,720
  • 2
  • 33
  • 34
  • Thanks. Will try this. Also, how to stop it from loading if true? – Tracer May 13 '15 at 20:01
  • 1
    @Tracer make a function and write some JS to tell it `window.stop()` when user is using chrome. – knocked loose May 13 '15 at 20:08
  • 3
    this won't stop the mailware warning from popping up first though. You will get the mailware warning and then nothing will be displayed. – Steve May 13 '15 at 20:10
  • Guys, I appreciate the help but I never said that malware warning is showing right away when my webpage is loading. So, don't assume things I never confirmed trying to show me as unreasonable. – Tracer May 13 '15 at 20:15