Mobile/Open Web: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Draft}}
{{Draft}}
The Mobile Web must be opened, like the Desktop was. Evangelism is a key point of the plan to reach that goal, but not the only one.


This page tries to list the different attacks points and to lead to more specification action plans to reach the goal.
The Mobile web must be opened, like the Desktop web was a decade ago. This requires a multiple-pronged strategy.  


== Evangelism: reach non-conforming sites ==
This page lists the different attack points and links to more specific action plans.
See the [https://wiki.mozilla.org/Mobile/Evangelism more detailed plan].


Reach existing sites and ask/help them to fix them. We don't want only to stigmatize them but we want to help them fixing their sites.
== Site Evangelism ==
*As Opera and MS said in the CSSWG: "but it doesn't scale" — which means it is worth mainly for big sites, the most difficult to reach.
*This will takes time with little success. We've seen with the Fx 10 2-digit version number evangelism. Sites almost never move before the problem is critical. Even with a precise diagnostic and an offer for help.


This means that ''this won't be sufficient'' by itself, but is worth to be conducted and we have to focus on important sites first. Consequence: we have to measure our success to devote adequate resource to this.
See the [[Mobile/Evangelism|more detailed plan]].


;'''Allies
We must reach existing sites and ask/help them to fix themselves. We don't want to demonize them for "doing it wrong" but we want to help them fixing their sites.
:we want to promote the Open Mobile Web and not only a Gecko-Webkit mobile web. Our message should (and will) reflect this. Other mobile browser vendors have the same problems (Opera, Microsoft, ...). Can we work together?
 
* Opera and MS claimed in the CSSWG: "it doesn't scale" - maybe, but it is worth it for big sites, although they can be the most difficult to reach.
* This will takes time and, as we've seen with the Firefox 10 2-digit version number evangelism, sites often don't move before the problem is critical. Even with a precise diagnostic and an offer for help. We need to keep the pressure on.
 
This won't be sufficient by itself, but is worth doing and we have to focus on important sites first. We have to measure our success to make sure we devote adequate resources to this.
 
Allies: we want to promote the Open Mobile Web and not only a Gecko/WebKit mobile web. Our message should (and will) reflect this. Other mobile browser vendors have the same problems (particularly Opera and Microsoft). Can we work together?
 
== Developer Evangelism ==


== Evangelize Web developers and their managers ("Stop the bleeding") ==
Web Developers must get accurate information about how to do a mobile web site that works on every browsers:
Web Developers must get accurate information about how to do a mobile web site that works on every browsers:
;We need good practices
 
:There are no ultimate good practices. We need to be pragmatic. Ideas of good-practice-related MDN articles:
We need pragmatic MDN articles on:
* How to do proper UA sniffing for mobile sites?
 
* How not to forget a prefix?
* How to do proper UA sniffing for mobile sites
* '''I'm using a prefixed property, what other prefix/polyfill do I need to add to keep the Web open?''' (-webkit fail-over)
* How not to forget a prefix
* How to decide when to put an unprefixed CSS properties?
* I'm using a prefixed property, what other prefix/polyfill do I need to add to keep the Web open? (-webkit fail-over)
* Progressive Enhancement (and polyfills to reach them)
* How to decide when to use an unprefixed CSS property?
: These good practice should be in references pages (on the MDN). Then we need to advertize them in conference, blogs, tweets, ...
* Progressive Enhancement (and polyfills to deal with older browsers)
;We need to lead Web developers to tools that simplify the process of writing/testing
 
: These tools will help them in producing Open-Web-friendly sites
These good practices should be in references pages (on the MDN). Then we need to advertise them in conference, blogs, tweets, etc. We need to lead Web developers to tools that simplify the process of writing/testing open web-friendly sites:
 
* preprocessors (Sass, Less, ...)
* preprocessors (Sass, Less, ...)
* validators (CSSLint, ...)
* validators (CSSLint, ...)
* ... (Feel free to complete)
* etc.
But reaching Web developers is not easy: they are busy and not all haunt the blogosophere or events
 
*we need small campaigns on specific subjects (to occupy almost permanently the blogosphere and social networks)
But reaching Web developers is not easy: they are busy and not all haunt the blogosphere or events.
*we need big coordinated campaigns between vendors(?) (to reach Web dev that are not reading blogs, going to events, ...)
 
* We need small campaigns on specific subjects (spread via the blogosphere and social networks)
* We need big coordinated campaigns between vendors(?) (to reach Web devs that are not reading blogs or going to events, ...)
 
Web devs have managers, and we should turn them into our allies. We should craft messages to convince the managers that asking for sites for 'iPhone-only' is not a good investment (they could ask for all devices for almost the same amount of money).


;Web devs have managers
== Tools ==
: ... and we should turn them into our allies. We should craft messages to convince the managers that asking for sites for 'iPhone' only is a lost of money (they could ask for all devices for the same amount of money)
 
We need to provide tools that help authors find incompatibilities earlier, and make the easy path the right path.


== Improve and provide tools ==
Provide tools and functionality that help authors find incompatibilities earlier ("Web Devs will take the easier path"):
;Preprocessors
;Preprocessors
: Check that SASS, Less, ... (Feel free to complete) do not have bugs, that is do not forget some prefixes/polyfills...
: Check that SASS, Less, ... (Feel free to complete) do not have bugs, that is do not forget some prefixes/polyfills...
;CSSLint
;CSSLint
:Be sure that the entries are correct and up-to-date
:Be sure that the entries are correct and up-to-date
;Online tools
;Online tools
:There are plenty online tools that generate prefixed and unprefixed syntax (for animations, transitions and especially gradients), we have to check them and reach their authors if there are bugs
:There are plenty of online tools that generate prefixed and unprefixed syntax (for animations, transitions and especially gradients). We have to check them and reach their authors if there are bugs.
 
;JS un-prefixing tools
;JS un-prefixing tools
:We should not recommend them (most of them are in O(n) of the CSS size at best, and degradation if network slow to load the script may lead to problems like FOUC or similar).
:We should not recommend them (as most of them are slow to run, and if the network is slow to load the script they may lead to problems like FOUC or similar).
:But as Web devs use them, we need to check that they do their job correctly! And reach their authors if needed
:But as Web devs use them, we need to check that they do their job correctly! And reach their authors if needed.
 
;Automatic regression finders on different engines
;Automatic regression finders on different engines
:there are companies offering that: we have to be sure we are tested) (Cloud Testing?)
:there are companies offering that: we have to be sure we are tested) (Cloud Testing?)
;Remote debugging
;Remote debugging
:debugging and regression testing in an automated way?
:debugging and regression testing in an automated way?
;Desktop testing
;Desktop testing
:https://wiki.mozilla.org/Mobile/Desktop_Extension
:https://wiki.mozilla.org/Mobile/Desktop_Extension
;New Tools
;New Tools
: (feel free to list ideas)
: (feel free to list ideas)


== Work at the CSS & HTML spec level ==
== CSS/HTML Specification Work ==
 
See detailed thoughts about the CSS part of the problem: [https://wiki.mozilla.org/Platform/Layout/CSS_Compatibility]
See detailed thoughts about the CSS part of the problem: [https://wiki.mozilla.org/Platform/Layout/CSS_Compatibility]
;Remove prefixes as soon as possible
 
:"as they are shorter, there will be a bias to adopt them instead" — Tantek's opinion
* We should aim to remove prefixes as soon as possible.
: We need to push what's possible to CR.
* We need to push what's possible to CR.
;Be sure that useful CSS properties are all on the standard track
* We need to make sure that all useful CSS properties are on the standard track somewhere. There are a some that are not:
:There are a some that are not:
** -webkit-scrolling-overflow: touch; looks new and not yet submitted. Is praised by some articles about the release of Chrome for Android: ''Happily, the very new -webkit-overflow-scrolling: touch property, which debuted in iOS 5, is also now available in Chrome for Android. It’s smooth and fast.'' (See [http://www.sencha.com/blog/html5-scorecard-chrome-mobile-beta/] )
:*-webkit-scrolling-overflow: touch; looks new and not yet submitted. Is praised by some articles about the release of Chrome for Android: ''Happily, the very new -webkit-overflow-scrolling: touch property, which debuted in iOS 5, is also now available in Chrome for Android. It’s smooth and fast.'' (See [http://www.sencha.com/blog/html5-scorecard-chrome-mobile-beta/] )
**... (complete please!)
:*... (complete please!)
 
;Drop prefixed ones once unprefixed
* Drop prefixed versions at some point after unprefixing
:Convince other vendors to drop them once the unprefixed shipped (even only Google, it would be nice as it would create uncertainty again in using them). This uncertainty will force Web developers to maintain their sites and will favor simplicity (i.e. unprefix) over complexity.
** Convince other vendors to do the same (even if it's only Google, it would be nice as it would create uncertainty again in using them). This uncertainty will force Web developers to maintain their sites and will favor simplicity (i.e. unprefix) over complexity.
;Remove (lessen) the need for UA sniffing
* Remove (lessen) the need for UA sniffing
:Web developers sniff UA for several reasons:
:Web developers sniff UA for several reasons:
* To work-around bugs in browsers. This is not a big problem as that means that they are already considering different engines. Improving interoperability by fixing bugs is always nice.
* To work-around bugs in browsers. This is not a big problem as that means that they are already considering different engines. Improving interoperability by fixing bugs is always nice.
* To provide different HTML for mobile and desktop as they have different layouts. This is necessary in different cases:
* To provide different HTML for mobile and desktop as they have different layouts. This is necessary in different cases:
**First if they have ''completely different Web sites''. We should convince them that this is not necessary the right way to go: Progressive Enhancement (PE) is much more future-proof.
** First if they have ''completely different Web sites''. We should convince them that this is not necessary the right way to go: Progressive Enhancement (PE) is much more future-proof. (XXX I'm not sure about this - do we really want to tell people not to do one site for desktop and one site for mobile? While it may be technically possible to have a unified site, lots of people do two, and why do we care massively, as long as the mobile version works?)
** Second, they do this when the layout of the mobile and desktop ''can't be achieved with the same HTML''. We should push the adoption of new CSS layouts (CSS3 Columns, FlexBox and perhaps Grids). This improved flexibility will reduce the need for UA Sniffing ([http://www.lukew.com/ff/entry.asp?1390], under Source Order)
** Second, they do this when the layout of the mobile and desktop ''can't be achieved with the same HTML''. We should push the adoption of new CSS layouts (CSS3 Columns, FlexBox and perhaps Grids). This improved flexibility will reduce the need for UA Sniffing ([http://www.lukew.com/ff/entry.asp?1390], under Source Order)
** To serve less big HTML images for the mobile than the desktop (no Media Queries for HTML, only for CSS!) ([http://www.lukew.com/ff/entry.asp?1390], under Media). We need to <span style="text-decoration: underline;">solve the <img> HTML problem</span> (See [http://24ways.org/2011/adaptive-images-for-responsive-designs HTML has an <img> problem]):
** To serve less big HTML images for the mobile than the desktop (no Media Queries for HTML, only for CSS!) ([http://www.lukew.com/ff/entry.asp?1390], under Media). We need to <span style="text-decoration: underline;">solve the <img> HTML problem</span> (See [http://24ways.org/2011/adaptive-images-for-responsive-designs HTML has an <img> problem]):
Line 79: Line 94:
*** A SVG image is blurry in Firefox if resized, defeating the opportunity to recommend to use SVG images where possible. ([https://bugzilla.mozilla.org/show_bug.cgi?id=600207 Bug 600207])
*** A SVG image is blurry in Firefox if resized, defeating the opportunity to recommend to use SVG images where possible. ([https://bugzilla.mozilla.org/show_bug.cgi?id=600207 Bug 600207])


== Technical changes on Firefox for Mobile ==
== Technical Changes to Firefox for Mobile ==
There are changes to Firefox for Mobile that can be done to facilitate its adoption. With a relevant market share, our stance towards the Open Web will be much easily heard (Market share is a mean not a goal per se, though it is always nice :-) )
 
;UA that gives the Mobile/Tablet information to the site.
There are changes to Firefox for Mobile that can be done to facilitate its adoption and/or compatibility:
:This allows them to do adequate Mobile detection
 
:Done for Firefox for Mobile
* UA that gives the Mobile/Tablet information to the site (done for Mobile, not yet for B2G, as they don't do tablets yet)
:Not done for B2G!
* Support, temporarily and on mobile only, for some -webkit-prefixed properties
;Support, temporary and on mobile, for some webkit-prefixed properties...
* Fix bugs that sites tell us mean they have to UA-sniff:
:There are a lot of buzz today with the CSSWG discussing Mozilla intention to support some webkit-prefixed properties. Which leads to a lot of evangelization buzz.
** {{bug|600207}}: SVG-as-image is fuzzy/pixelated when zoomed or printed, when we trigger the tiling codepath (XXXwhich site or sites need this?)
;Fix bugs that prohibit the drop of UA sniffing (at least in some cases):
:[https://bugzilla.mozilla.org/show_bug.cgi?id=600207 Bug 600207]: SVG-as-image is fuzzy/pixelated when zoomed or printed, when we trigger the tiling codepath


== Other ==
== Other ==
There are a lot of other small actions to be conducted:
 
*Some sites (like touch.facebook.com) are using lists of mobile UA (WURFL-> so we need to reach them)
There are a lot of other small actions we could consider:
*Fix on github (see Pre-fix the Web http://codepo8.github.com/prefix-the-web/ by Chris Heilmann)
 
*What about isitopenyet.com website with a number representing the amount of top-100 websites w/ a correct CSS ? (An automatisation of J. Jensen results?)
* Make sure our new UA string is included in lists of mobile UAs like WURFL
*...
* Fix code which is on GitHub or other open repositories (see [http://codepo8.github.com/prefix-the-web/ Prefix the Web] by Chris Heilmann)
* Perhaps create an isitopenyet.com website with a number representing the amount of top-100 websites w/ correct CSS, if we can successfully detect that?

Revision as of 14:18, 17 February 2012

Draft-template-image.png THIS PAGE IS A WORKING DRAFT Pencil-emoji U270F-gray.png
The page may be difficult to navigate, and some information on its subject might be incomplete and/or evolving rapidly.
If you have any questions or ideas, please add them as a new topic on the discussion page.

The Mobile web must be opened, like the Desktop web was a decade ago. This requires a multiple-pronged strategy.

This page lists the different attack points and links to more specific action plans.

Site Evangelism

See the more detailed plan.

We must reach existing sites and ask/help them to fix themselves. We don't want to demonize them for "doing it wrong" but we want to help them fixing their sites.

  • Opera and MS claimed in the CSSWG: "it doesn't scale" - maybe, but it is worth it for big sites, although they can be the most difficult to reach.
  • This will takes time and, as we've seen with the Firefox 10 2-digit version number evangelism, sites often don't move before the problem is critical. Even with a precise diagnostic and an offer for help. We need to keep the pressure on.

This won't be sufficient by itself, but is worth doing and we have to focus on important sites first. We have to measure our success to make sure we devote adequate resources to this.

Allies: we want to promote the Open Mobile Web and not only a Gecko/WebKit mobile web. Our message should (and will) reflect this. Other mobile browser vendors have the same problems (particularly Opera and Microsoft). Can we work together?

Developer Evangelism

Web Developers must get accurate information about how to do a mobile web site that works on every browsers:

We need pragmatic MDN articles on:

  • How to do proper UA sniffing for mobile sites
  • How not to forget a prefix
  • I'm using a prefixed property, what other prefix/polyfill do I need to add to keep the Web open? (-webkit fail-over)
  • How to decide when to use an unprefixed CSS property?
  • Progressive Enhancement (and polyfills to deal with older browsers)

These good practices should be in references pages (on the MDN). Then we need to advertise them in conference, blogs, tweets, etc. We need to lead Web developers to tools that simplify the process of writing/testing open web-friendly sites:

  • preprocessors (Sass, Less, ...)
  • validators (CSSLint, ...)
  • etc.

But reaching Web developers is not easy: they are busy and not all haunt the blogosphere or events.

  • We need small campaigns on specific subjects (spread via the blogosphere and social networks)
  • We need big coordinated campaigns between vendors(?) (to reach Web devs that are not reading blogs or going to events, ...)

Web devs have managers, and we should turn them into our allies. We should craft messages to convince the managers that asking for sites for 'iPhone-only' is not a good investment (they could ask for all devices for almost the same amount of money).

Tools

We need to provide tools that help authors find incompatibilities earlier, and make the easy path the right path.

Preprocessors
Check that SASS, Less, ... (Feel free to complete) do not have bugs, that is do not forget some prefixes/polyfills...
CSSLint
Be sure that the entries are correct and up-to-date
Online tools
There are plenty of online tools that generate prefixed and unprefixed syntax (for animations, transitions and especially gradients). We have to check them and reach their authors if there are bugs.
JS un-prefixing tools
We should not recommend them (as most of them are slow to run, and if the network is slow to load the script they may lead to problems like FOUC or similar).
But as Web devs use them, we need to check that they do their job correctly! And reach their authors if needed.
Automatic regression finders on different engines
there are companies offering that: we have to be sure we are tested) (Cloud Testing?)
Remote debugging
debugging and regression testing in an automated way?
Desktop testing
https://wiki.mozilla.org/Mobile/Desktop_Extension
New Tools
(feel free to list ideas)

CSS/HTML Specification Work

See detailed thoughts about the CSS part of the problem: [1]

  • We should aim to remove prefixes as soon as possible.
  • We need to push what's possible to CR.
  • We need to make sure that all useful CSS properties are on the standard track somewhere. There are a some that are not:
    • -webkit-scrolling-overflow: touch; looks new and not yet submitted. Is praised by some articles about the release of Chrome for Android: Happily, the very new -webkit-overflow-scrolling: touch property, which debuted in iOS 5, is also now available in Chrome for Android. It’s smooth and fast. (See [2] )
    • ... (complete please!)
  • Drop prefixed versions at some point after unprefixing
    • Convince other vendors to do the same (even if it's only Google, it would be nice as it would create uncertainty again in using them). This uncertainty will force Web developers to maintain their sites and will favor simplicity (i.e. unprefix) over complexity.
  • Remove (lessen) the need for UA sniffing
Web developers sniff UA for several reasons:
  • To work-around bugs in browsers. This is not a big problem as that means that they are already considering different engines. Improving interoperability by fixing bugs is always nice.
  • To provide different HTML for mobile and desktop as they have different layouts. This is necessary in different cases:
    • First if they have completely different Web sites. We should convince them that this is not necessary the right way to go: Progressive Enhancement (PE) is much more future-proof. (XXX I'm not sure about this - do we really want to tell people not to do one site for desktop and one site for mobile? While it may be technically possible to have a unified site, lots of people do two, and why do we care massively, as long as the mobile version works?)
    • Second, they do this when the layout of the mobile and desktop can't be achieved with the same HTML. We should push the adoption of new CSS layouts (CSS3 Columns, FlexBox and perhaps Grids). This improved flexibility will reduce the need for UA Sniffing ([3], under Source Order)
    • To serve less big HTML images for the mobile than the desktop (no Media Queries for HTML, only for CSS!) ([4], under Media). We need to solve the <img> HTML problem (See HTML has an <img> problem):
      • The <img> tag has not the flexibility of the audio and video HTML elements that allow the client to choose the most adequate version of the media. Instead, people does UA sniffing or do dirty tricks w/ JS.
      • A SVG image is blurry in Firefox if resized, defeating the opportunity to recommend to use SVG images where possible. (Bug 600207)

Technical Changes to Firefox for Mobile

There are changes to Firefox for Mobile that can be done to facilitate its adoption and/or compatibility:

  • UA that gives the Mobile/Tablet information to the site (done for Mobile, not yet for B2G, as they don't do tablets yet)
  • Support, temporarily and on mobile only, for some -webkit-prefixed properties
  • Fix bugs that sites tell us mean they have to UA-sniff:
    • bug 600207: SVG-as-image is fuzzy/pixelated when zoomed or printed, when we trigger the tiling codepath (XXXwhich site or sites need this?)

Other

There are a lot of other small actions we could consider:

  • Make sure our new UA string is included in lists of mobile UAs like WURFL
  • Fix code which is on GitHub or other open repositories (see Prefix the Web by Chris Heilmann)
  • Perhaps create an isitopenyet.com website with a number representing the amount of top-100 websites w/ correct CSS, if we can successfully detect that?