├── LICENSE.md ├── README.md └── tag-security-privacy.md /LICENSE.md: -------------------------------------------------------------------------------- 1 | # Creative Commons Attribution 4.0 International 2 | 3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 4 | 5 | **Using Creative Commons Public Licenses** 6 | 7 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 8 | 9 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 10 | 11 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 12 | 13 | ## Creative Commons Attribution 4.0 International Public License 14 | 15 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 16 | 17 | ### Section 1 – Definitions. 18 | 19 | a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 20 | 21 | b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 22 | 23 | c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 24 | 25 | d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 26 | 27 | e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 28 | 29 | f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 30 | 31 | g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 32 | 33 | h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. 34 | 35 | i. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 36 | 37 | j. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 38 | 39 | k. __You__ means the individual or entity exercising the Licensed Rights under this Public License. __Your__ has a corresponding meaning. 40 | 41 | ### Section 2 – Scope. 42 | 43 | a. ___License grant.___ 44 | 45 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 46 | 47 | A. reproduce and Share the Licensed Material, in whole or in part; and 48 | 49 | B. produce, reproduce, and Share Adapted Material. 50 | 51 | 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 52 | 53 | 3. __Term.__ The term of this Public License is specified in Section 6(a). 54 | 55 | 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 56 | 57 | 5. __Downstream recipients.__ 58 | 59 | A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 60 | 61 | B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 62 | 63 | 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 64 | 65 | b. ___Other rights.___ 66 | 67 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 68 | 69 | 2. Patent and trademark rights are not licensed under this Public License. 70 | 71 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. 72 | 73 | ### Section 3 – License Conditions. 74 | 75 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 76 | 77 | a. ___Attribution.___ 78 | 79 | 1. If You Share the Licensed Material (including in modified form), You must: 80 | 81 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 82 | 83 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 84 | 85 | ii. a copyright notice; 86 | 87 | iii. a notice that refers to this Public License; 88 | 89 | iv. a notice that refers to the disclaimer of warranties; 90 | 91 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 92 | 93 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 94 | 95 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 96 | 97 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 98 | 99 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 100 | 101 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. 102 | 103 | ### Section 4 – Sui Generis Database Rights. 104 | 105 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 106 | 107 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; 108 | 109 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 110 | 111 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 112 | 113 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 114 | 115 | ### Section 5 – Disclaimer of Warranties and Limitation of Liability. 116 | 117 | a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ 118 | 119 | b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ 120 | 121 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 122 | 123 | ### Section 6 – Term and Termination. 124 | 125 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 126 | 127 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 128 | 129 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 130 | 131 | 2. upon express reinstatement by the Licensor. 132 | 133 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 134 | 135 | c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 136 | 137 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 138 | 139 | ### Section 7 – Other Terms and Conditions. 140 | 141 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 142 | 143 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 144 | 145 | ### Section 8 – Interpretation. 146 | 147 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 148 | 149 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 150 | 151 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 152 | 153 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 154 | 155 | > Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 156 | > 157 | > Creative Commons may be contacted at creativecommons.org 158 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Explainer: Reduce fingerprinting in the Accept-Language header 2 | 3 | This proposal is an early design sketch by Privacy Sandbox to describe the problem below and solicit feedback on the proposed solution. It has not been approved to ship in Chrome. 4 | 5 | 6 | 7 | 8 | - [A Problem](#a-problem) 9 | - [A Proposal](#a-proposal) 10 | - [For example...](#for-example) 11 | - [Language negotiation](#language-negotiation) 12 | - [No `Content-Language` in the response header](#no-content-language-in-the-response-header) 13 | - [`Content-Language` matches `Accept-Language`](#content-language-matches-accept-language) 14 | - [`Content-Language` doesn't match `Accept-Language`](#content-language-doesnt-match-accept-language) 15 | - [Feature Compatibility](#feature-compatibility) 16 | - [Challenges](#challenges) 17 | - [Web Compatibility](#web-compatibility) 18 | - [Large Avail-Language size](#large-avail-language-size) 19 | - [FAQ](#faq) 20 | - [What user needs are solved by reducing the Accept-Language header?](#what-user-needs-are-solved-by-reducing-the-accept-language-header) 21 | - [Do we need to update the JavaScript interface (i.e. Navigator.languages) too?](#do-we-need-to-update-the-javascript-interface-ie-navigatorlanguages-too) 22 | - [How to prevent malicious sites from learning users' preferred languages?](#how-to-prevent-malicious-sites-from-learning-users-preferred-languages) 23 | - [What about the quality value in the Accept-Language header?](#what-about-the-quality-value-in-the-accept-language-header) 24 | - [Does resending the language negotiation request increase latency when the Content-Language doesn’t match any of the user's accepted languages?](#does-resending-the-language-negotiation-request-increase-latency-when-the-content-language-doesnt-match-any-of-the-users-accepted-languages) 25 | - [Considered alternatives](#considered-alternatives) 26 | - [Moving the language header to a new client hint `Sec-CH-Lang`](#moving-the-language-header-to-a-new-client-hint-sec-ch-lang) 27 | - [Sending nothing on the first request](#sending-nothing-on-the-first-request) 28 | - [Reference](#reference) 29 | 30 | 31 | 32 | ## A Problem 33 | 34 | Chrome (and other browsers) send all of the user's language preferences on every HTTP request via the `Accept-Language` header. The header's value contains a lot of entropy about the user that is sent to servers by default. While some sites use this information for content negotiation, servers can also [passively](https://w3c.github.io/fingerprinting-guidance/#dfn-passive-fingerprinting) capture this information without the user's awareness to fingerprint a user. As part of the Chrome team’s anti-covert tracking efforts, we would like to improve privacy protections by minimizing passive fingerprinting surfaces. 35 | 36 | An example of the `Accept-Language` header sent on a request: 37 | 38 | ``` 39 | GET /foo HTTP/1.1 40 | Host: example.com 41 | Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7 42 | ``` 43 | 44 | Our goal is to find the best possible language between the user's preferred languages and the websites supported languages. Since servers usually don't need to know the full list of languages the user accepts during [content negotiation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation), this explainer proposes a mechanism to update the `Accept-Language` behavior which would allow us to better protect user privacy while still allowing sites to perform language-based content negotiation. 45 | 46 | ## A Proposal 47 | 48 | We propose that, by default, the browser should only send the user's most preferred language in the `Accept-Language` header instead of sending all languages. That means we only send only one language in the `Accept-Language` request header. 49 | 50 | ### For example... 51 | 52 | As proposed, users will only send a single language in the `Accept-Language` request header, and the site will respond with the document language in the `Content-Language` response header. For example, an Accept-Language's initial request to `https://example.com` will include the following request headers: 53 | 54 | ``` 55 | Get / HTTP/1.1 56 | Host: example.com 57 | Accept-Language: en 58 | ``` 59 | 60 | The server will respond with a `Content-Language` header indicating the document language. 61 | 62 | ``` 63 | HTTP/1.1 200 OK 64 | Content-Language: en 65 | ``` 66 | 67 | ### Language negotiation 68 | 69 | Since we will only send a single language in the `Accept-Language` header, we will cover the cases which will require further language negotiation to deliver the content in the best possible language for the user. 70 | 71 | ### No `Content-Language` in the response header 72 | 73 | This means the content is intended for all language audiences. No action should be taken by the browser. Users will receive whatever content the sites provide. 74 | 75 | ### `Content-Language` matches `Accept-Language` 76 | 77 | In this case, the user received content in their preferred language. No further language negotiation is needed. 78 | 79 | ### `Content-Language` doesn't match `Accept-Language` 80 | 81 | Instead of sending a full list of the users' preferred languages from browsers and letting sites figure out which language to use, we propose a language negotiation process in the browser, which means in addition to the `Content-Language` header, the site also needs to respond with a header indicating all languages it supports using the `Avail-Language` header (as proposed in [HTTP Availability Hints](https://mnot.github.io/I-D/draft-nottingham-http-availability-hints.html#section-5.3)). 82 | 83 | For now, the response header will include both `Content-Language` and `Avail-Language`. Let’s see how language negotiation works with the following examples: 84 | 85 | 86 | 1. Site supported language contains user’s preferred language. 87 | * Suppose the user prefers English (en) and they also accept Spanish (es), and they visit `https://example.com`. The following request header `Accept-Language` provides user's preferred language: 88 | 89 | ``` 90 | GET / HTTP/1.1 91 | Host: example.com 92 | Accept-Language: en 93 | ``` 94 | 95 | * `https://example.com` doesn’t have a page in English. The server either guesses the users’ preference or sends a page with a default language such as French to users. To allow language negotiation in the browser if the language the site chose to send the content in differs from the user’s preferred language, the site will respond with a list of supported languages in the Avail-Language header: Spanish (es) and French (fr). 96 | 97 | ``` 98 | HTTP/1.1 200 OK 99 | Content-Language: fr 100 | Vary: Accept-Language # Vary is used to key the HTTP cache 101 | Avail-Language: es, fr 102 | ``` 103 | 104 | * The browser sees that the `Content-Language` doesn’t match any of the user's accepted languages, but it knows the server can provide the content in one of the user's accepted languages: Spanish (es). Therefore, the browser resends the request as follows (the browser will only retry once for each request to avoid infinite retries): 105 | 106 | ``` 107 | GET / HTTP/1.1 108 | Host: example.com 109 | Accept-Language: es 110 | ``` 111 | 112 | * Now, the site will respond with a page in Spanish (es) which matches one of the user's accepted languages. 113 | 114 | ``` 115 | HTTP/1.1 200 OK 116 | Content-Language: es 117 | Vary: Accept-Language   # Vary is used to key the HTTP cache 118 | Avail-Language: es, fr 119 | ``` 120 | 121 | 2. The site’s supported languages don’t match any of the user’s accepted languages 122 | 123 | In this case, we keep the existing behavior, users will receive whatever content the site provides. One option for users is that they can switch to using the translation service to translate the page to a language they prefer. 124 | 125 | ## Feature Compatibility 126 | 127 | While we propose to limit the amount of language information sent to a site, our proposal ensures that from the site’s point of view, there are no regressions in behavior with respect to delivering the right content to the user. This proposal allows a site to maintain all language-based functionality, without having to receive all the user’s language preferences, through the client-side language selection mechanism described above. 128 | 129 | ## Challenges 130 | 131 | This section attempts to document the major challenges for the proposal to gain ecosystem adoption. 132 | 133 | ### Web Compatibility 134 | 135 | In addition to the scenarios where we reduce the fingerprinting to protect user’s privacy, we also want to maintain web compatibility. Even though sending the preferred language by default might reveal some information about the user, we feel it’s important to minimize the breakage of features that depend on `Accept-Language` as much as possible to maintain stability of the web ecosystem. 136 | 137 | ### Large Avail-Language size 138 | 139 | One of the challenging situations is that a site can support infinite [ possible languages](https://www.iso.org/iso-639-language-codes.html) because of arbitrary subtags, and the `Avail-Language` header could get large, however unlikely. It could be problematic to send such a large field in the HTTP response header. One option to mitigate this issue is that servers can simply not include the Avail-Language header in the server's response when a site supports all or most of the possible languages. Another possible option is that we might suggest sites send `Avail-Language: *` to indicate sites that support all or most of the possible languages. In addition to those, we could also send all the languages sites supported in the `Avail-Language` header regardless of how large the payload will be. Assuming about 500 languages with 5 characters on average per language/locale, the total size of the Avail-Language header would be about 2.5KB. 140 | 141 | ## FAQ 142 | 143 | ### What user needs are solved by reducing the Accept-Language header? 144 | 145 | As we mentioned at the beginning of this explainer, we believe that the `Accept-Language` header is a source of passive entropy. By only sending a single language in the `Accept-Language` header, it helps Chrome to protect users' privacy. 146 | 147 | ### Do we need to update the JavaScript interface (i.e. Navigator.languages) too? 148 | 149 | Developers usually access two JavaScript API related to language: `navigator.language` and `navigator.languages`. We can keep `navigator.language` as it is for now since it returns the most preferred language of the user. For `navigator.languages`, we could limit it to return one language (as an array) which would be similar to how `navigator.language` works. 150 | 151 | ### How to prevent malicious sites from learning users' preferred languages? 152 | 153 | Malicious sites can learn a full list of users' preferred languages by continuously providing different languages in the response. To address this, davidben@ propose some [possibilities](https://github.com/davidben/client-language-selection#abuse). We can start with rate limit language changes or distinct language lists for a site. To support our initial thoughts we need to gather metrics to understand how this plays in the ecosystem. 154 | 155 | ### What about the quality value in the Accept-Language header? 156 | 157 | The `Accept-Language` header includes a quality value (q-factor weighting, e.g. `q=0.9` in the example below) to indicate relative preference. 158 | 159 | ``` 160 | Accept-Language: en-US,en;q=0.9,de;q=0.8 161 | ``` 162 | 163 | As the [RFC4647](https://datatracker.ietf.org/doc/html/rfc4647#section-2.3) shows, the default value of `q=1` is used if there is no quality value specified. In this case, this proposal plans to remove `q` weighting unless we figure out it’s required for web compatibility. In which case q weighting will be frozen to `q=1`. 164 | 165 | ### Does resending the language negotiation request increase latency when the Content-Language doesn’t match any of the user's accepted languages? 166 | 167 | As mentioned above, the browser will only retry once for each request to resend the request to do language negotiation. We will keep monitoring the benchmarking metrics when experimenting to see whether it would increase latency significantly. 168 | 169 | ## Considered alternatives 170 | 171 | ### Moving the language header to a new client hint `Sec-CH-Lang` 172 | 173 | The [lang client hint RFC](https://tools.ietf.org/id/draft-west-lang-client-hint-00.txt) draft defines a client hint to allow developers to opt-in perform content negotiation based on the users’ preferred languages. However, davidben@ elaborates the reason why we prefer `Accept-Language` in [Client-side Language Selection proposal](https://github.com/davidben/client-language-selection#considered-alternatives). 174 | 175 | 176 | ### Sending nothing on the first request 177 | 178 | Another [proposal](https://github.com/WICG/lang-client-hint) suggests not sending the `Accept-Language` header in the initial request. However, we believe that it would be better to send the `Accept-Language` header in the initial request to prevent the additional cost of extra round trip sending a retry with the correct language. 179 | 180 | Some internal Google research (and intuition) indicates the user's top most preferred language has a strong correlation with the rough geolocation, so the header leaks a limited amount of additional entropy to all sites when we send the most preferred language only. In order to prevent a poor user experience where users get a site in a language that they can't understand on the first request, we believe it would be better to send the `Accept-Language` header in the initial request with just the most preferred language to prevent an extra round-trip for the sake of content negotiation. Also, the [Client-side Language Detection proposal](https://github.com/davidben/client-language-selection#client-hints) outlines the reasons why we prefer using the `Accept-Language` header instead of introducing a new client hint. 181 | 182 | Sending the primary language in the `Accept-Language` header will allow us to also gather data about the effectiveness of this approach, which we can use to inform decisions about subsequent steps to further reduce the entropy in the `Accept-Language` header. 183 | 184 | ## Reference 185 | 186 | * [https://github.com/davidben/client-language-selection](https://github.com/davidben/client-language-selection) 187 | * [https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation) 188 | * [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) 189 | * [https://wonderproxy.com/blog/accept-language/](https://wonderproxy.com/blog/accept-language/) 190 | * https://github.com/WICG/lang-client-hint 191 | * https://www.rfc-editor.org/rfc/authors/rfc9110.html#name-accept-language 192 | -------------------------------------------------------------------------------- /tag-security-privacy.md: -------------------------------------------------------------------------------- 1 | # Security and Privacy questionnaire 2 | 3 | ### 1. What information does this feature expose, and for what purposes? 4 | 5 | This feature exposes less information via the `Accept-Language` string than is currently exposed. Its intent is to reduce fingerprinting of existing information, not to expose new information. To mitigate the impact on certain use cases, we provide a language negotiation mechanism to determine the best language representation for the user. A server can potentially send an `Avail-Language` header to indicate its language preferences. If the language specified in the `Content-Language` header does not match the client's preferences, the client can select another language from the `Avail-Language` list that aligns with its `Accept-Language` preferences. 6 | 7 | ### 2. Do features in your specification expose the minimum amount of information necessary to implement the intended functionality? 8 | Yes. 9 | 10 | ### 3. Do the features in your specification expose personal information, personally-identifiable information (PII), or information derived from either? 11 | No more than what Accept-Language already exposes (and our goal is to reduce that). 12 | 13 | ### 4. How do the features in your specification deal with sensitive information? 14 | This feature does not deal with sensitive information. 15 | 16 | ### 5. Does data exposed by your specification carry related but distinct information that may not be obvious to users? 17 | No. 18 | 19 | ### 6. Do the features in your specification introduce state that persists across browsing sessions? 20 | For origins that opt-in the language negotiation mechanism, this specification will save the most preferred negotiated language in a cache owned by the user agent. This cache is an ordered map, keyed by origin, with each value being a single language. A site can clear the browser's cached language for its origin by clearing site data. The cached language will also be automatically cleared if there is no site activity for 30 days. 21 | 22 | ### 7. Do the features in your specification expose information about the underlying platform to origins? 23 | No. 24 | 25 | ### 8. Does this specification allow an origin to send data to the underlying platform? 26 | No. 27 | 28 | ### 9. Do features in this specification enable access to device sensors? 29 | No. 30 | 31 | ### 10. Do features in this specification enable new script execution/loading mechanisms? 32 | No. 33 | 34 | ### 11. Do features in this specification allow an origin to access other devices? 35 | No. 36 | 37 | ### 12. Do features in this specification allow an origin some measure of control over a user agent’s native UI? 38 | No. 39 | 40 | ### 13. What temporary identifiers do the features in this specification create or expose to the web? 41 | None. 42 | 43 | ### 14. How does this specification distinguish between behavior in first-party and third-party contexts? 44 | For origins that opt-in the language negotiation mechanism, to reduce performance risks, third-party contexts will not have a separate language negotiation process. Instead, they will inherit the first party's preferred language to maintain a consistent user experience. 45 | 46 | ### 15. How do the features in this specification work in the context of a browser’s Private Browsing or Incognito mode? 47 | Chrome's Incognito mode already reduces Accept-Language; this change brings its behavior to regular mode. 48 | 49 | ### 16. Does this specification have both "Security Considerations" and "Privacy Considerations" sections? 50 | No. The feature in the specification does not have any security or privacy impact beyond what Accept-Language today provide. 51 | 52 | ### 17. Do features in your specification enable origins to downgrade default security protections? 53 | No 54 | 55 | ### 18. What happens when a document that uses your feature is kept alive in BFCache (instead of getting destroyed) after navigation, and potentially gets reused on future navigations back to the document? 56 | Nothing. The feature is only used during initial document processing when a navigation is triggered. 57 | 58 | ### 19. What happens when a document that uses your feature gets disconnected? 59 | Nothing. The feature is only used during initial document processing when a navigation is triggered. 60 | 61 | ### 20. Does your spec define when and how new kinds of errors should be raised? 62 | This feature does not produce new kinds of errors. 63 | 64 | ### 21. Does your feature allow sites to learn about the user’s use of assistive technology? 65 | No. 66 | 67 | ### 22. What should this questionnaire have asked? 68 | Nothing else that comes to mind. 69 | --------------------------------------------------------------------------------