From 68fc8e96a9629e73469ed457abd955e548ec670c Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:49:58 +0100 Subject: unslug pt-br: move --- .../guide/mobile/mobile-friendliness/index.html | 30 ++++++++++++++++++++++ .../web/guide/mobile/separate_sites/index.html | 30 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 files/pt-br/web/guide/mobile/mobile-friendliness/index.html create mode 100644 files/pt-br/web/guide/mobile/separate_sites/index.html (limited to 'files/pt-br/web/guide/mobile') diff --git a/files/pt-br/web/guide/mobile/mobile-friendliness/index.html b/files/pt-br/web/guide/mobile/mobile-friendliness/index.html new file mode 100644 index 0000000000..4fd3c49a1a --- /dev/null +++ b/files/pt-br/web/guide/mobile/mobile-friendliness/index.html @@ -0,0 +1,30 @@ +--- +title: Site Móvel Amigável +slug: Web_Development/Mobile/Mobile-friendliness +translation_of: Web/Guide/Mobile/Mobile-friendliness +--- +

O que é site móvel amigável?

+

Mobile friendliness can mean a multitude of things, depending on who you’re talking to. It can be helpful to think of it in terms of three goals for improving your site’s user experience: Presentation, Content, and Performance.

+

Goal #1 (Presentation)

+

“Make websites that work well on a variety of screen sizes.”

+

These days, users can access the web on devices in a wide range of form factors, including phones, tablets, and eReaders. Needless to say, a fixed-width, three-column layout filled with complex JavaScript animations and mouse-over effects is not going to look or feel quite right on a phone with a 2-inch-wide screen and a diminutive processor. A slimmed-down, linearized page layout with elements sized for a touchscreen would be much more appropriate. That’s why this first goal is all about presenting your content in a way that makes life easy for users on mobile device.

+

Goal #2 (Content)

+

“Adjust your content for mobile users.”alaska_air_mobile_and_desktop-300x225.png

+

Think about what your users want to do at your site if they are on a phone. A great example of this is Alaska Air’s website. Their desktop site focuses on getting visitors to book trips. Mobile users, however, are probably more interested in checking-in for a flight or seeing if their flight is delayed. They’ve adjusted their site’s content to reflect this, and it meets the needs of mobile users.

+

Goal #3 (Performance)

+

“Give your users a smooth experience, even on a slow connection.”

+

Though things have been getting better in recent years, browsing the Internet over a wireless data connection can still be pretty painful. This makes it more essential than ever to practice good performance practices, only sending the user the bits they will actually need.

+

Know your audience

+

While not strictly a part of the definition of being mobile friendly, defining who your target audience is makes these goals much more concrete. For example, it is absolutely critical to keep in mind which browsers and devices you will target when picking a mobile strategy. If your audience is full of early-adopters, you can focus on tablets and smartphones with standards-friendly browsers. On the other hand, if many of your site’s users are on devices with less capable browsers, that may eliminate certain strategies as viable options.

+

Approaches to mobile Web development

+

The following approaches aim to achieve each of these goals by different means.

+ +
+

Original document information

+

Originally published on 4 May, 2011 on the Mozilla Webdev blog as "Approaches to Mobile Web Development Part 1 - What is Mobile Friendliness?", by Jason Grlicky.

+
+

 

diff --git a/files/pt-br/web/guide/mobile/separate_sites/index.html b/files/pt-br/web/guide/mobile/separate_sites/index.html new file mode 100644 index 0000000000..2ca783fbc9 --- /dev/null +++ b/files/pt-br/web/guide/mobile/separate_sites/index.html @@ -0,0 +1,30 @@ +--- +title: Sites separados para celular e desktop +slug: Web_Development/Mobile/Sites_separados +translation_of: Web/Guide/Mobile/Separate_sites +--- +

The "separate sites" approach to mobile Web development involves creating different sites for mobile and desktop Web users. This approach has positive and negative aspects.

+

The good

+

The first option is the most popular by far: use user-agent detection to route users on phones to a separate mobile site, typically at m.example.com. In a nutshell, this technique uses server-side logic to solve all three goals of mobile web development at once — if the user’s browser looks like it’s on a phone, you serve them mobile content, formatted for their phone and optimized for speed.

+

Conceptually simple, this is the easiest option to add to an existing site, especially if you are using a CMS or Web application that supports templates. Since only the mobile-specific content, styles, and scripts are sent to mobile users, this method also provides for the best performance out of any of the other options presented here. Finally, it also allows for completely different user experiences on desktop and mobile — they’re two different sites, after all!

+

The bad

+

Unfortunately, this approach is not without its drawbacks. For starters, you are now maintaining two different pages for every page on your site that you would like to expose to mobile users. If you are using a CMS, is possible to arrange your site templates in a way that minimizes this duplication. However any time that there is a difference between the mobile and desktop templates, there is a potential source of complication in your code. Similarly, this increases the implementation time of any new site features, since you must now code two sets of front-end logic.

+

Even more important than that, though, is the fact that user-agent detection is inherently flawed, and anything but future-proof. Every time a new browser comes out, you must adjust your algorithm to accommodate it. And false positives are particularly scary — it could be embarrassing to serve desktop users your mobile site accidentally.

+

When it is right to choose this option

+

sumo_screenshot.pngFirstly, if your target audience includes users on older or low-end feature phones, it is worth noting that you may need to employ this strategy to some degree no matter what. This is because the default browsers on some feature-phones do not support the same markup that you would use to code a website targeted at the desktop, but instead understand formats like XHTML-MP or the older WML.

+

This factor aside, there is one case where this strategy really shines over other methods. If the functionality you would like to provide to your users on mobile devices is extremely different from that on a desktop, then using separate sites is simply likely to be the most practical choice. This is because you have the option of sending completely separate HTML, JavaScript, and CSS to phones and PCs.

+

Another case where you may be forced to use this approach is if you cannot, for whatever reason, modify your existing desktop site, and need to have a 100% separate mobile site. Though it’s not ideal, at least you have this option.

+

Examples

+

Most of the major Web applications you see in the wild have chosen this path, including Facebook, YouTube, Digg, and Flickr. In fact, Mozilla picked this strategy for the mobile versions of addons.mozilla.org (AMO) and support.mozilla.org (SUMO). If you’d like to see the source code behind an example of this approach in action, feel free to check out the github repository for AMO or SUMO.

+

Approaches to mobile Web development

+

See the following articles for background and other approaches to developing for mobile platforms.

+ +
+

Original document information

+

This article was originally published on 13 May 2011, on the Mozilla Webdev blog as "Approaches to Mobile Web Development Part 2 – Separate Sites", by Jason Grlicky.

+
+

 

-- cgit v1.2.3-54-g00ecf