Determine if NetEase is the app open or the browser opens. Cookies

Source: Internet
Author: User

There is a need for the page to determine the different open way to the innermost link to make different adjustments,

This will be divided into four scenarios, app, browser x Android, Apple system, At first, the page URL address with the parameters (Android) and the user agent (Apple) return value to Judge Navigator.useragent, but found that only the first page URL with a special parameter character, so, then used another method of cookies, The default cookie is automatically invalidated when the browser is closed.

Cookie settings document.cookie= "userid=828"; Constant setting will automatically overlay.

If you want to store more than one name/value pair at a time, you can use a semicolon plus a space (; Separated

Reference Address: http://www.jb51.net/article/14566.htm

Determine if NetEase is the app open or the browser opens. Cookies

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.