(turn) Mobile station adaptation Rel=alternate PC page and H5 page fit callout

Source: Internet
Author: User

Transfer from https://www.cnblogs.com/osfipin/p/5852037.html

In view of the surging tide of mobility and the H5 of the page, Baidu introduced the best solution for PC page and H5 page's Jump Fit method:
1. On the PC version of the webpage, add a special link to the corresponding mobile URL rel= "Alternate" tag, which helps Baidu to find the site of the mobile version of the page location;
2. Also on the mobile page, add a link to the corresponding PC version of the URL rel= "canonical" tag.

Computer-side website:

Mobile Website:

If your URL is:
PC version URL: http://pc_url
Mobile URL: Http://mobile_url


Then the comments in this example are as follows:
On the PC version page (http://pc_url), add:

<link rel= "Alternate" media= "only screens and (max-width:640px)" href= "Http://pc_url" >

On the mobile page (Http://mobile_url), the required comments should be:

<link rel= "canonical" Href= "Http://mobile_url" >

The previous META tag (mobile agent) will continue, but we recommend using the HTMAL5 language to make mobile pages with the latest scheme for jump adaptation, other such as the XML language mobile page jump adaptation, need to continue to use the previous meta tag way:

<meta name= "mobile-agent" content= "FORMAT=[WML|XHTML|HTML5"; Url=mobile_url ">

(turn) Mobile station adaptation Rel=alternate PC page and H5 page fit callout

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.