Firefox/Projects/Firefox Start

From MozillaWiki
Jump to: navigation, search

Instead of loading Firefox Start from the network, use a locally hosted web application that provides the same functionality but offers greater potential for user control & customization, as well as engagement and interaction between Mozilla and users.

See also: in-progress documentation on the snippet service

  • Proposed by: beltzner, cbeard
  • Project lead: mak
  • Project members: mak, beltzner, cbeard, limi, justin

Status

Shipped in Beta 5, default in beta 6, snippets service live and serving content.

Next steps

  • restyle with updated logos and look to match Google.com

Goals

  • locally hosted page with
  • no chrome privilege required
  • some form of offline experience
  • control/customization of search engine used
  • ability to display user engagement messages from mozilla.com servers
  • do all of the above in a scalable and measurable way
  • track performance and conversion of each snippet

Non Goals

  • ability to perform history/cache searches when offline
  • option to use Google-hosted Firefox Start page
  • For the initial implementation will not feature any dynamic content like history/bookmark lookups.
  • segment on anything other than:
    • client version
    • last client update
    • client host operating system
    • client locale
    • add-ons installed on client
  • understand the impressions of each snippet

Timeline / Milestones

Phase 1 : locally hosted replacement

  • host local HTML/JS/CSS content (done)
  • ensure search codes remained consistent with existing page (localization, geoip/load balancing redirects)(partially done)
  • ensure cookies are not sent when page loads(partially done)
  • ensure client ships with default set of snippets for initial offline support(done)

Phase 2 : add dynamism, offline support

  • allow search engine to be modified based on Search Box selection follow-up, perf hog due to content priv.
  • add dynamic snippet delivery and display (partially done)
  • add offline detection and messaging
  • cdn hosting of snippets
  • async fetch of content with analytics on click-through

Phase 3 : bells and whistles (time permitting)

  • design changes
  • multi-variant testing support
  • some local places DB analysis (about:me style stuff)

Timeline TBD

These are the bugs of interest:

Bug & Summary Owner Status
bug 563723 - add about:home to mimic Firefox Start mak done
bug 563738 - Add current Mozilla "snippets" in the about:home page mak done
bug 544819 - Bug 544819 - Create a basic Home Tab linking to the current Home Page nobody haven't started, waits app tabs
bug 593366 - Bug 593366 - Default text for about:home dynamic content beard done
bug 593379 - Bug 593379 - Populate about:home's localStorage with properties to allow for custom content beard Just filed

Requirements

  • privacy: do not send any data to third party web services when loaded
  • performance: benchmark to show performance difference over web-hosted Firefox Start
  • performance: don't hit moz servers for every impression
  • performance: better offline experience than web-hosted Firefox Start
  • metrics: ability to do a/b testing with engagement pieces

Dependencies

  • product: talk with Google to arrange a technical contact and to ensure a smooth handoff (beltzner) done
  • webdev: engagement pieces to be delivered from mozilla.com service
  • fix localStorage bug: it does not allow to set entries for URIs without a host (about: pages have just scheme and path). bug 568091 (done)
  • localStorage is main-thread only (IO on another thread is future target though since not really needed for first implementation). (follow-up)
  • Use search service engine definitions, inject from chrome context at startup (done)

Design Specification

Visual Design

Sketch and tracking bug coming soon, but essentially:

  • increase font size in textbox
  • use better version of search service logo
  • change layout so that it doesn't look as squooshed
  • leave space for snippets more or less where they exist now
  • add links to privacy policy, user rights

Dynamic Content Delivery

See also: in-progress documentation on the snippet service

The about:home page will check a mozilla.com URL regularly for updated content. This content will be delivered as a single file containing a blob of HTML which will be stored in localStorage for subsequent page loads.

The content may include styling, script, or image content but the client will do nothing unusual with it, it simply injects the content stored in localStorage it into a prescribed div's innerHtml on page load (all js code must live in <script/> tags).

The current proposal from Justin is to fetch content from a URL with path-based segmentation, e.g.

http://start.mozilla.com/%STARTPAGE_VERSION%/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/content.json

[We'll have to fix that suffix - this is not a json object, just a blob of html]

current implementation points to:

http://snippets.mozilla.com/%STARTPAGE_VERSION%/%NAME%/%VERSION%/%APPBUILDID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/

Load assumptions:

  • The page will try to update once per day
  • Because the update is managed by about:home itself, users who never load that page (because they have alternate home pages, or don't use the home page functionality) will not make update requests
  • Beard believes that all content can be served from the single blob, so that there's no need for other collateral. That means inline script & styling, data: urls for images, etc.

Dynamic Content Presentation in Client

The client will ship with JS in the Firefox Start page that checks for locally cached content in localStorage, and inject it into the page. If no content is found, default content will be injected (this content will ship with the browser and can be updated through a Firefox application update) The JS will also retrieve new content from the delivery service, asynchronously, and store it in localStorage for subsequent use. Additional data parameters can be stored in localStorage such that the content can access it for additional dynamism without private data being sent over the wire.

  • client will check mozilla hosted service at most once per day
  • client will download content from mozilla hosted service if update available
  • client will store content in localStorage
  • client will inject locally stored content into a div on Firefox Start page
  • if no content exists, client will show "default content" that ships with browser bug 593366
  • client will store additional data in localStorage so content can access it (e.g.: number of add-ons installed - full list to be supplied by Beard)

Morgamic's Architecture Discussion/Questions

(This section is now out of date since the content delivery mechanism is no longer JSON - I'll let Mike decide what he wants to do with it, though)

possible architecture snippet-service.png

morgamic's questions:

  • metrics: how would we track conversion and click through rates (use an existing system)
    • web content could include tracking links, pending policy/privacy review Beltzner 07:03, 3 September 2010 (PDT)
  • enterprise solutions: how would we integrate a pre-existing solution without degrading service level
  • what kind of admin functions are crucial
  • disaster recovery - how do we tell firefox we are down, or enter a static only mode
    • if network resource fails to load, use cached content or defaullt clntentBeltzner 07:03, 3 September 2010 (PDT)
  • cheap checks - can we set it up so client only pulls if content-length header is changed for json feed (and skip downloading entire document)
    • yes!Beltzner 07:03, 3 September 2010 (PDT)

Testing

tbd

Related Projects

  • Application Tabs
  • Home Tab