{"id":119,"date":"2014-12-09T21:41:27","date_gmt":"2014-12-10T02:41:27","guid":{"rendered":"http:\/\/blog.mozilla.org\/advancingcontent\/?p=119"},"modified":"2019-09-18T13:57:37","modified_gmt":"2019-09-18T18:57:37","slug":"getting-tiles-data-into-firefox","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/advancingcontent\/2014\/12\/09\/getting-tiles-data-into-firefox\/","title":{"rendered":"Getting Tiles Data Into Firefox"},"content":{"rendered":"<p>A month ago, we announced that the <a href=\"https:\/\/blog.mozilla.org\/advancingcontent\/2014\/11\/13\/announcing-firefox-tiles-going-live-today\/\">new Tiles experience<\/a> is available in the stable Firefox build. We <a href=\"https:\/\/blog.mozilla.org\/futurereleases\/2014\/05\/09\/new-tab-experiments\/\">experimented<\/a> earlier this year and found that users do want more than empty boxes or screenshots in Firefox. \u00a0The Mozilla project is also working hard to set higher standards for the industry around transparency and control of the use of a user&#8217;s data. \u00a0With that in mind, we wanted to make it clear what data we do and do not pass from Mozilla servers to Firefox to enable the Tiles experience, and here, we\u2019ll address how Tiles get into Firefox. \u00a0You can, of course, <a href=\"https:\/\/wiki.mozilla.org\/Tiles\/Technical_Documentation#Source_Code\">inspect the source code<\/a>, but this might be easier.<\/p>\n<p>Typically, if a web page adds external content, it does so by embedding an unencrypted remote request with cookied identifiers, so the server can respond as fast as possible with relevant content. The server also wants to remember as much as possible about the context of the request such as IP addresses and referrals, so this all is tracked through a persistent identifier that could be shared and triangulated with other data sources. Frequently, where a server wants to gather as much data as possible about users, invisible image beacons and iframes\/scripts may be used to gather more information. \u00a0This is all done with little understanding by, or permission from, the user.<\/p>\n<div id=\"attachment_120\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/Tiles_Request_Headers.png\"><img aria-describedby=\"caption-attachment-120\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/Tiles_Request_Headers-600x313.png\" alt=\"Tiles Request Headers Graphic\" width=\"600\" height=\"313\" class=\"size-large wp-image-120\" srcset=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/Tiles_Request_Headers-600x313.png 600w, https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/Tiles_Request_Headers-252x131.png 252w, https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/Tiles_Request_Headers.png 988w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-120\" class=\"wp-caption-text\">No special request headers or body data sent<\/p><\/div>\n<p><strong>What we are doing with Tiles is different<\/strong><\/p>\n<p>With the November 10th release, Firefox sends a single custom request once per day and then saves data locally to be used for as many new tabs opened by the user. \u00a0The Mozilla server sees the IP address of the request, and uses that to determine geotargeting at a country level (e.g., nothing more granular than \u201cUnited States\u201d or \u201cGermany\u201d). \u00a0The request URL contains the locale of the Firefox build to ensure the content Firefox shows is language and location appropriate.<\/p>\n<p>Having received the request, we respond with the appropriate content and then delete the raw data with IP addresses within a week. Even with this minimal actionable data set, we are able to determine the volume of requests for specific country\/locale pairs. This helps us decide which tiles to translate to provide a useful experience to new users in those regions.<\/p>\n<p>The JSON response contains display information: Tiles graphics resources, URLs and titles, and is defined for a specific country\/locale pair.<\/p>\n<div id=\"attachment_121\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/code_snippet.png\"><img aria-describedby=\"caption-attachment-121\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/code_snippet-600x230.png\" alt=\"Code snippet\" width=\"600\" height=\"230\" class=\"size-large wp-image-121\" srcset=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/code_snippet-600x230.png 600w, https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/code_snippet-252x96.png 252w, https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/code_snippet.png 988w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-121\" class=\"wp-caption-text\">Sample en-US response with an array of tile data objects<\/p><\/div>\n<p>Tiles is still evolving, and this is an initial release, but there are several things that we like about how we get Tiles data into Firefox.<\/p>\n<p>Very importantly, this is an experience that is controlled by the user, involves the minimal actionable dataset. \u00a0\u201cTracking\u201d has become a loaded term, and we do not consider Tiles to be tracking. \u00a0We do not need or try to identify an individual with these data requests, meaning that no cookies need to be set (and no other techniques to \u201cfingerprint\u201d are used). \u00a0However, we assume that anyone who has previously set their <a href=\"https:\/\/www.mozilla.org\/dnt\">DNT<\/a> preference to \u201cdo not track\u201d wishes to opt out of the experience, and so no request is sent. \u00a0DNT is not how a user will opt out of the Tiles experience: a user who has Tiles can also set \u201cdo not track\u201d independently of their Tiles settings.<\/p>\n<p>The architecture reduces the latency requirements of our Tiles experience compared to traditional web pages: because Firefox can request and cache the data, it can pre-load assets, pre-compute personalization, and pre-populate the new tab page, so when users open a new tab, it\u2019s fast and immediately usable.<\/p>\n<p>And even though we send little data and save little data, we secure that data with transport encryption and prevent attacks with <a href=\"https:\/\/wiki.mozilla.org\/SecurityEngineering\/Public_Key_Pinning\">key pinning<\/a>.<\/p>\n<p>There are downsides to this approach: the data file could be outdated in both space and time. For example, a user could download tiles for their home country but then travels elsewhere, or we might accidentally show a Happy New Year tile after that date has passed. Also, because we package additional information in order to let Firefox make decisions, Firefox ends up with some title and URL data of Enhanced tiles that are not shown to users. \u00a0These are all potential improvements we\u2019re looking forward to making.<\/p>\n<div id=\"attachment_122\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/unicorn.png\"><img aria-describedby=\"caption-attachment-122\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/unicorn.png\" alt=\"Happy New Year Tile... might be a day late!\" width=\"400\" height=\"346\" class=\"size-full wp-image-122\" srcset=\"https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/unicorn.png 400w, https:\/\/blog.mozilla.org\/advancingcontent\/files\/2014\/12\/unicorn-252x217.png 252w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-122\" class=\"wp-caption-text\">Happy New Year Tile&#8230; might be a day late!<\/p><\/div>\n<p>I\u2019m sure we can improve on our implementation. \u00a0We would also love to hear your thoughts on our approach to getting relevant Tiles data to power the default Directory and Enhanced Tiles experiences. \u00a0Next time, we will detail how we report data on interactions with Tiles.<\/p>\n<p>&ndash; <a href=\"mailto:edilee@mozilla.com\">Ed Lee<\/a> on behalf of the Tiles team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A month ago, we announced that the new Tiles experience is available in the stable Firefox build. We experimented earlier this year and found that users do want more than empty boxes or screenshots in Firefox. \u00a0The Mozilla project is &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/advancingcontent\/2014\/12\/09\/getting-tiles-data-into-firefox\/\">Continue reading<\/a><\/p>\n","protected":false},"author":468,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10810,175982],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/posts\/119"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/users\/468"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/posts\/119\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/media?parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/categories?post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/advancingcontent\/wp-json\/wp\/v2\/tags?post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}