Home  >  Q&A  >  body text

javascript - In addition to judging UA, is there any other way to judge whether the request comes from mobile or PC?

UA is too easy to be forged. I would like to ask if there are other methods that are not easy to forge to determine whether the request comes from PC or mobile

I temporarily want to (check) a way to judge whether it is triggered based on the window.ontouchstart method, but it seems to be easy to be faked?

ringa_leeringa_lee2733 days ago567

reply all(3)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-18 11:01:01

    Determine screen size?

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-18 11:01:01

    Just judge based on the UA. If the mobile terminal forges the UA of the PC, it means that the user wants to access the PC page

    reply
    0
  • 迷茫

    迷茫2017-05-18 11:01:01

    If you have your own app, you can request your own client interface, or you can judge

    reply
    0
  • Cancelreply