为什么在非桌面设备上使用 m.*(移动)子域而不是使用 CSS 规则来调整网站外观的趋势很明显?

发布于 2024-11-27 10:02:10 字数 136 浏览 1 评论 0原文

许多支持网络的设备都需要不同的显示调整,而不仅仅是移动电话。也许我错了,但我认为 m.子域名的负担与 WWW 或 http: 或 :80 相同。

CSS 使我们能够确保在所有媒体中正确显示,那么为什么这么多出版商和传播者提倡创建移动子域呢?

There is a wide range of web capable devices that require different display adjustments, not only mobile phones. Maybe 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

执手闯天涯 2024-12-04 10:02:10

使用 CSS,您可以控制文档的呈现方式,而不是文档本身。

使用小设备屏幕上网的用户可能对阅读大量文本不感兴趣,而只对有用的信息感兴趣。

为桌面用户制作的网站通常包含大量 html 代码、脚本、图像和浏览器必须下载的其他资源。使用手持设备的用户可能会发现加载速度太慢,或者消耗太多带宽,或者 JS 代码可能很草率,导致网站几乎无法导航。

此外,许多外部加载的资源不会被许多手持设备缓存,直到它们的大小非常轻。

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.

ぽ尐不点ル 2024-12-04 10:02:10

m.* 域名不仅仅改变了原有网站的图形风格。以下是我所看到的:

  • 延迟内容加载以降低带宽(例如:仅显示几封邮件的 gmail)
  • 更少的小部件(例如:聊天、Facebook 移动网站中的应用程序 [不是应用程序])
  • 不同的交互(触摸,我知道有是facebook的触摸版,除了移动版的基本版)

肯定还有很多其他的变化。

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.

姐不稀罕 2024-12-04 10:02:10

网站这样做主要是为了当他们想要为移动客户端定制比网站外观更多的内容时。大多数网站(和网络应用程序)除了不同的 CSS 之外,还向移动客户端提供更少的 HTML 和 JavaScript,以加快加载时间和渲染时间(移动设备的 CPU 能力比台式机/笔记本电脑低得多) 。

因此,保持事物分离™并在不同的域上创建新应用程序是有意义的。这样,两个应用程序(桌面和移动)就更容易维护。

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.

℡寂寞咖啡 2024-12-04 10:02:10

这篇文章表明“m”子域名正在走上恐龙,根据现代 RWD 最佳实践。它还表明,许多公司选择创建一个单独的域,因为很难在“自上而下”构建的成熟网站上注入“移动优先”方法。

但是,如果您正在处理大型、成熟的遗留代码库,管理层规定了某些设计,并且/或者您的团队规模很大,那么您可能会被要求分叉代码库并创建新的移动业务。

我认为另一个原因是,在不久的将来,移动子域是一种最佳实践,因为我们没有工具、技术和理念来创建在移动连接上快速加载的桌面网站,并且在那些非常愚蠢的移动浏览器中正确呈现。如今,大多数手机都具有相对智能的浏览器,并且可以使用与桌面浏览器相同的响应式网站,而无需下载超出需要的内容。

当然,RWD 技术还有很长的路要走:特别是,在我写这篇文章时,我们仍在等待响应式 元素或类似元素。但即使现在也有合理的解决方法。

编辑:

虽然 Paul Lewis 最近谈论关于获得您的网站尽快出现在屏幕上(3 秒内),他还对移动网站进行了微弱的攻击。

如果这听起来像是一种迂回的说法,m-dot 网站可能是
不好...[肯定地皱眉]

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]

还不是爱你 2024-12-04 10:02:10

在许多情况下,由于设备较小、没有键盘/鼠标和营销策略的性质,在移动设备上“复制”网站并不总是最佳的。例如,也许您希望为访问者提供定位商店的功能,或者立即拨打您的号码的功能。在许多情况下,为标准计算机分辨率设计的网站在移动设备中根本无法发挥作用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文