为什么网站定期将语言 "en"、"fr" 等放在 URL 中,而不是将其留在会话 variable/cookie 等中?

Why do sites regularly place language "en", "fr", etc in the URL rather than leaving it in a session variable/cookie etc?

当然,语言是一个单独的东西,最好根据用户的浏览器设置或他们选择并保存的明确设置(通过 session/cookie)进行设置。

如果我要发送我刚读给我的法语朋友的页面,那么 URL 中没有任何语言代码会更好,因此它会根据他的浏览器以法语打开设置或之前访问该站点。

这对我来说似乎很明显...但是很多主要站点都将语言放在 URL 中。所以我觉得我一定错过了什么......什么?

我能看到的唯一优势是用于索引目的。如果您的网站需要被编入索引(例如电子商务产品),那么语言对于区域搜索引擎来说就变得非常重要。

例如,这里是 Google doc 的摘录:

Google uses the content of the page to determine its language, but the URL itself provides human users with useful clues about the page’s content. For example, the following .ca URLs use fr as a subdomain or subdirectory to clearly indicate French content: http://example.ca/fr/vélo-de-montagne.html and http://fr.example.ca/vélo-de-montagne.html.