开发者

Why there is a strong trend to use m.* (mobile) sub-domain for non desktop devices instead of using CSS rules to adjust the look of a website?

开发者 https://www.devze.com 2023-03-25 02:20 出处:网络
There is a wide range of web capable devices that require different display adjustments, not only mobile phones. Mayb开发者_JS百科e I\'m wrong but I think that the m. sub-domain will be the same burde

There is a wide range of web capable devices that require different display adjustments, not only mobile phones. Mayb开发者_JS百科e I'm wrong but I think that the m. sub-domain will be the same burden as WWW or http: or :80.

CSS enables us to ensure a proper display in all media, so why are so many publishers and evangelists promoting creating mobile sub-domains?


With CSS you can control the presentation of the document, not the document iself.

A user surfing the web with a small device screen may not be interested in reading tons of lines of text, but only useful informations.

A website made for desktop users usually contain lot of html code, scripts, images and other resources the browser has to download. A user using a handheld device may find it too slow to load, or consume too much bandwidth, or the JS code may be sloppy and make the site virtually impossible to navigate.

Also many external loaded resources won't be cached by many handheld devices until their size is really lightweight.


m.* domain do not only change the graphical style of the original website. Here's what I've seen:

  • lazy content loading for lowering bandwith (ex: gmail which display only a few mails)
  • less widgets (ex: chat, applications in Facebook mobile site [not the application])
  • different interactions (touch, I know there is a touch version of facebook, besides the mobile basic one)

there must be many other changes.


Websites do this mostly for when they want to customize more than the look of the website for mobile clients. Most websites (and web apps) serve, besides different CSS, less HTML and less JavaScript to their mobile clients, in order to speed up loading times and rendering times (mobile devices are much less capable in terms of CPU power than desktops / laptops).

Because of this, it makes sense to Keep Things Separate™ and create a new app, on a different domain. This way, the two apps (desktop and mobile) are easier to maintain.


In many cases, due to the nature of the smaller device, no keyboard/mouse and marketing strategies, it is not always optimal to "duplicate" a website on mobile devices. For example, maybe you want to offer the ability for a visitor to locate a store, or immediately have the ability to dial your number.In many cases, a website designed for a standard computer resolution is simply not that functional in a mobile device.


This article suggests that "m" subdomains are going the way of the dinosaur, in light of modern RWD best practices. It goes on to suggest that many companies have chosen to create a separate domain because it's difficult to inject a "mobile first" approach on a mature site that has been built from the "top down".

If, however, you are dealing with a large, mature, legacy codebase, management dictates certain designs, and/or your team is large, you may be called on to fork the codebase and create a new mobile presence.

I think another reason is that, in the recent past, a mobile subdomain was a best practice because we didn't have the tools, technology and philosophies to create a desktop site that loaded quickly on a mobile connection, and that rendered correctly in those very dumb mobile browsers. Nowadays, most mobile phones have comparatively smart browsers, and can consume the same responsive site as a desktop browser, without downloading more than it needs.

There is certainly still a way to go with RWD tech: in particular, at the time I wrote this, we were still waiting on a responsive <picture> element, or similar. But even now there are reasonable workarounds.

EDIT:

While Paul Lewis talks recently about how important it is to get your site on screen asap (within 3 seconds), he also has a wee jab at mobile sites.

if that sounds like a roundabout way of saying m-dot sites might be bad... [affirmative wincing]

0

精彩评论

暂无评论...
验证码 换一张
取 消