Mobile Web Development

Source: Internet
Author: User

In the modern web development, a new mobile device Web page development, under such requirements, you need to consider how mobile Web and PC Web synchronization processing

1  /* 2     * How browsers identify mobile devices 3    */4     var ua =  Navigator.userAgent.toLowerCase (); 5     var ipad =/ipad/gi.test (UA); 6     var android =/android| adr/gi.test (UA); 7     var iphone =/iphone/gi.test (UA);

Is the mobile web going to be responsive or separate?

We need to focus on these two issues:

1. What's your application scenario?

2. How do you design your responsive style?

If your Web page is simple and lightweight, you can use media query to implement the response style, or the CSS's responsive framework. such as: blog, Small business station, etc.

How your Web page is relatively large, it is necessary to use the above code to determine the mobile device to render different versions of the template, the combination of the corresponding static resources, is also considered a kind of response. But one drawback is the high cost of maintenance.

In a variety of situations, the static resources of the response is necessary to do, large-scale pages can be used in response to the component to solve the problem of re-use, function synchronization.

In short, depending on the scene response can be done from various levels, various granularity. This is a feature of modern web development.

This article is partly taken from: knowing--Zhang Kejun's answer

Mobile Web Development

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.