I am trying to make a website with features only available on browsers with WebKit engines, So I wanted a website to be get loaded only when it detects WebKit browser and redirects to an alternative website if the host's browser doesn't use Webkit, Is it possible through Javascript or any Back-end languages? If yes, How can it be done?
Asked
Active
Viewed 139 times
0
-
2Take a look: https://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser – dazed-and-confused Dec 30 '20 at 13:34
-
The best approach would be to use feature detection rather than browser sniffing. Can your browser do X, Y and Z? Then go ahead, I don't need to see your ID. – Álvaro González Dec 30 '20 at 16:15
2 Answers
1
document.onload=function() {
if(navigator.userAgent.indexOf("Chrome") === -1 )
{
window.location.replace("http://www.stackoverflow.com");
}}

Nader Hashemi
- 11
- 3
0
You can redirect the traffic based on user agent to different endpoints before it arrives to your origin. It depends on your InfraStructure. for Ex you can use Big-IP or Stingray with TrafficScript or also with AWS-cloudfront and Lambda functions.

Pedram Rastegar
- 71
- 1
- 3