1

When the link is opened or copy pasted in any browser apart from chrome, the page should not load is there any it can be done using Javascript of Java? I want my web application to be used only in chrome. Kindly help

Thank you

PakkuDon
  • 1,629
  • 4
  • 22
  • 21
Ragesh Kr
  • 1,315
  • 5
  • 24
  • 42

4 Answers4

4

Browser Detection would be a good place to start looking.

sv_in
  • 13,719
  • 9
  • 33
  • 55
1

I think this could work for you: http://www.netzwelt-kali.de/index.php?menuid=28&reporeid=67

jofe
  • 115
  • 1
  • 6
1

This is quite ugly. However, here's some way to do that :

or just with CSS :

body * {
  visibility: hidden;
}
@media screen and (-webkit-min-device-pixel-ratio:0) { /* Target only Chrome */
  body * {
    visibility: visible;
  }
}

I definitly don't know why you don't want users to come to your app with their favorite browser.

enguerranws
  • 7,667
  • 8
  • 46
  • 87
  • Besides, Javascript or CSS is no solution. All the user needs to do is disable the bit that performs the test, for instance with a tool like GreaseMonkey or something. To do it properly, you'd use server side web sniffing. – Mr Lister Jan 06 '14 at 12:52
0

I would not recommend making a website for only one browser.

However, here are two options for browser detection:

A browser detector

Quirksmode

Joe Ratzer
  • 17,513
  • 3
  • 35
  • 51