[Tip] Get the browser UA ID

Source: Internet
Author: User

This essay is a mere accumulation of small knowledge and will be labeled with a little knowledge later on.

By common, when downloading mobile app, only a QR code, but after scanning code, depending on whether the phone is iphone or Android download different apps, here is the code of this operation:

<! DOCTYPE HTML > 

The main thing here is to get the identity through navigator.useragent, and then output a string similar to the one below, and then determine the identity based on the keyword. It's simple.

"Mozilla/5.0 (iphone; CPU iphone OS 8_0 like Mac OS X applewebkit/600.1.3 (khtml, like Gecko) version/8.0 mobile/12a4345d safari/600.1.4 "

Reprint Please specify source: http://zhutty.cnblogs.com

[Tip] Get the browser UA ID

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.