Blame


1 00c39694 2020-08-04 op The HTTP protocol provides a definition for various headers. Among
2 00c39694 2020-08-04 op the various header defined, there is one that interest this rant
3 00c39694 2020-08-04 op today: `Accept-Language`.
4 00c39694 2020-08-04 op
5 00c39694 2020-08-04 op In layman's terms, the `Accept-Language` is used to tell the server
6 00c39694 2020-08-04 op what language(s) the user understands. For instance, when I visit a
7 00c39694 2020-08-04 op website, firefox sends something like this:
8 00c39694 2020-08-04 op
9 f8c3036d 2020-09-24 op ```http
10 f8c3036d 2020-09-24 op Accept-Language: en-US,en;q=0.5
11 f8c3036d 2020-09-24 op ```
12 00c39694 2020-08-04 op
13 00c39694 2020-08-04 op This means that I want English pages. Now, as always, in reality the
14 00c39694 2020-08-04 op server can do what it wants, and that's right. As an example, when
15 00c39694 2020-08-04 op you visit Wikipedia you can read an entry in other languages, or maybe
16 00c39694 2020-08-04 op you're using a web application that lets you choose the language.
17 00c39694 2020-08-04 op
18 00c39694 2020-08-04 op There are also moments when you have to ignore this headers. No
19 00c39694 2020-08-04 op matter what `Accept-Language` you send when reading this entry, the
20 00c39694 2020-08-04 op server will always reply with an English text. This is also fine, as
21 00c39694 2020-08-04 op not every content is available in every language.
22 00c39694 2020-08-04 op
23 00c39694 2020-08-04 op However, if you have content in different languages then ignoring the
24 00c39694 2020-08-04 op `Accept-Language` header and use the IP address to determine the
25 00c39694 2020-08-04 op language to use is just plain dumb. This is so stupid that I
26 00c39694 2020-08-04 op shouldn't even write about it, but one of the biggest sites out there
27 00c39694 2020-08-04 op does this, and today was the straw that breaks the camel's back.
28 00c39694 2020-08-04 op
29 00c39694 2020-08-04 op Even if I'm Italian and live in Italy, I use the `en_US.UTF-8` locale
30 00c39694 2020-08-04 op and browse the internet in English. Over 90% of my queries on DDG or
31 00c39694 2020-08-04 op google are in English (the percentage is completely arbitrary, but
32 00c39694 2020-08-04 op shouldn't be too wrong). I want the majority of websites to use the
33 00c39694 2020-08-04 op English language when they serve me pages, and most of them respects
34 00c39694 2020-08-04 op this decision. Not google.
35 00c39694 2020-08-04 op
36 00c39694 2020-08-04 op If I search something on google, I usually do it in a "private"
37 00c39694 2020-08-04 op window, so the preferences aren't saved and every single time I have
38 00c39694 2020-08-04 op to click to "English" in the homepage. Or skim through a page of
39 00c39694 2020-08-04 op results only to realize that I have to click "Change to English".
40 00c39694 2020-08-04 op
41 00c39694 2020-08-04 op (Regarding the "private" window: I try to avoid google in general, so
42 00c39694 2020-08-04 op I came up with this rule to use it only in private window. It's a
43 00c39694 2020-08-04 op inconvenience to reduce the number of times I use it. Privacy isn't
44 00c39694 2020-08-04 op really a concern here, given my `User-Agent` and a bit of GeoIP
45 00c39694 2020-08-04 op machinery it should be über easy to track me online. How many OpenBSD
46 00c39694 2020-08-04 op users live in northern Italy? I only know one guy except me)
47 00c39694 2020-08-04 op
48 00c39694 2020-08-04 op There was a time when if you visited `google.it` it should use the
49 00c39694 2020-08-04 op Italian language for the search results, and `google.com` used to
50 00c39694 2020-08-04 op deliver English/international-ish results. That was just perfect
51 00c39694 2020-08-04 op (still broken, but at least workable). Now google just see an Italian
52 00c39694 2020-08-04 op IP and use Italian for the search results.
53 00c39694 2020-08-04 op
54 00c39694 2020-08-04 op I wonder if I'll go to, say, Japan in vacation and do a search on
55 00c39694 2020-08-04 op google, will I see Japanese results?
56 00c39694 2020-08-04 op
57 00c39694 2020-08-04 op Even if this is just another example of google completely ignoring
58 00c39694 2020-08-04 op even the most basic standards just to cook up an half-broken NIH
59 00c39694 2020-08-04 op solution, it surprises me every time I think about it. (Talking 'bout
60 00c39694 2020-08-04 op NIH, believe me, I have another rant waiting to be written about
61 00c39694 2020-08-04 op building a library made by them)
62 00c39694 2020-08-04 op
63 00c39694 2020-08-04 op Is it really too difficult for google to just parse a goddamn header?
64 00c39694 2020-08-04 op
65 00c39694 2020-08-04 op ---
66 00c39694 2020-08-04 op
67 00c39694 2020-08-04 op Addendum: the reason I prefer to browse the web in English is that, at
68 00c39694 2020-08-04 op least for what concerns CS and tech in general, there seems to be
69 00c39694 2020-08-04 op better results in English pages rather than in Italian pages.
70 00c39694 2020-08-04 op