How to prevent a user from accessing the site if he has a mobile OC?

  • 0
    Here I have a site, and if a user comes to it from Android or IOS (from a mobile system of some kind), then I would like the user to be automatically redirected to the site page where it says: "Oops .... you cannot use our site .... here is a link to another version of our site for mobile devices: * link * ". Please tell me how this can be implemented in JavaScript?
    JavaScript Theodore Scott, Jul 17, 2020

  • 1 Answers
  • 0
    This is determined by the User-Agent header in the HTTP request received from the client when he visited the site.

    P.S. Change the difficulty of the question to easy
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!