From 7ae0d6b6999f2172d32205368bb044fae26bb736 Mon Sep 17 00:00:00 2001 From: hoarfroster Date: Sun, 7 Jul 2024 15:39:42 +0800 Subject: [PATCH 1/3] feat: update translation --- files/zh-cn/glossary/user_agent/index.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/files/zh-cn/glossary/user_agent/index.md b/files/zh-cn/glossary/user_agent/index.md index 922214492afe51..4b0a3ac7bdbecb 100644 --- a/files/zh-cn/glossary/user_agent/index.md +++ b/files/zh-cn/glossary/user_agent/index.md @@ -1,30 +1,28 @@ --- title: 用户代理 slug: Glossary/User_agent +l10n: + sourceCommit: 75ad4fdf5dd998e5926b2a8e9622f808fe8bb475 --- {{GlossarySidebar}} -用户代理是代表一个人的计算机程序,例如,一个在 {{Glossary("World Wide Web", "Web")}} 上的 {{Glossary("Browser","浏览器")}}。 +用户代理(User agent)是代表一个人的计算机程序,例如,一个在 {{Glossary("World Wide Web", "Web")}} 上的{{Glossary("Browser","浏览器")}}。 -除了浏览器之外,用户代理可以是抓取网页的机器人、下载管理器或可以访问 Web 的其他应用程序。随着向服务器发送的每个请求,浏览器包含一个可表明身份的 `User-Agent`{{Glossary("HTTP")}} 的协议头,叫作用户代理(UA,User Agent)字符串。此字符串通常标识浏览器、及其版本号及其主机操作系统。 +除了浏览器之外,用户代理可以是抓取网页的机器人、下载管理器或可以访问 Web 的其他应用程序。随着向服务器发送的每个请求,浏览器包含一个可表明身份的 `User-Agent` {{Glossary("HTTP")}} 的协议头,叫作用户代理(UA)字符串。此字符串通常标识浏览器、及其版本号及其主机操作系统。 垃圾邮件机器人、下载管理器和一些浏览器通常会发送一个假 UA 字符串来宣称自己是不同的客户端。这被称为*用户代理欺骗*。 -用户代理的字符串可以被 {{Glossary("JavaScript")}} 在客户端中使用 `navigator.userAgent` 获取。 +用户代理的字符串可以被 {{Glossary("JavaScript")}} 在客户端中使用 {{domxref("navigator.userAgent")}} 获取。 -典型的用户代理字符串如下所示: `"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"`. +典型的用户代理字符串示例长这样:`"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"`. ## 参见 -- 在维基百科上的 [User agent](https://en.wikipedia.org/wiki/User_agent) +- 在维基百科上的[用户代理](https://zh.wikipedia.org/wiki/用户代理) - {{domxref("Navigator/userAgent", "NavigatorID.userAgent")}} - [使用用户代理检测浏览器](/zh-CN/docs/Web/HTTP/Browser_detection_using_the_user_agent) - {{RFC(2616, "", "14.43")}}:`User-Agent` 标头 -- [术语表:](/zh-CN/docs/Glossary) - - - {{Glossary("Browser")}} - +- {{Glossary("Browser")}}(术语) - HTTP 标头 - - {{HTTPHeader("User-agent")}} From a44e28e637a53c37f3bc7ea81a6ad8c1e240ba37 Mon Sep 17 00:00:00 2001 From: Hoarfroster Date: Fri, 12 Jul 2024 15:20:35 +0800 Subject: [PATCH 2/3] feat: improvements Co-authored-by: Jason Ren <40999116+jasonren0403@users.noreply.github.com> --- files/zh-cn/glossary/user_agent/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/zh-cn/glossary/user_agent/index.md b/files/zh-cn/glossary/user_agent/index.md index 4b0a3ac7bdbecb..9e823d522c8c79 100644 --- a/files/zh-cn/glossary/user_agent/index.md +++ b/files/zh-cn/glossary/user_agent/index.md @@ -7,21 +7,21 @@ l10n: {{GlossarySidebar}} -用户代理(User agent)是代表一个人的计算机程序,例如,一个在 {{Glossary("World Wide Web", "Web")}} 上的{{Glossary("Browser","浏览器")}}。 +用户代理(User agent)是代表一个人的计算机程序,例如 {{Glossary("World Wide Web", "Web")}} 环境中的{{Glossary("Browser","浏览器")}}。 -除了浏览器之外,用户代理可以是抓取网页的机器人、下载管理器或可以访问 Web 的其他应用程序。随着向服务器发送的每个请求,浏览器包含一个可表明身份的 `User-Agent` {{Glossary("HTTP")}} 的协议头,叫作用户代理(UA)字符串。此字符串通常标识浏览器、及其版本号及其主机操作系统。 +除了浏览器之外,用户代理可以是抓取网页的机器人、下载管理器或可以访问 Web 的其他应用程序。随着向服务器发送的每个请求,浏览器包含一个可表明身份的 `User-Agent` {{Glossary("HTTP")}} 协议头,叫作用户代理(UA)字符串。该字符串通常可识别浏览器、浏览器版本号及其主机操作系统。 垃圾邮件机器人、下载管理器和一些浏览器通常会发送一个假 UA 字符串来宣称自己是不同的客户端。这被称为*用户代理欺骗*。 -用户代理的字符串可以被 {{Glossary("JavaScript")}} 在客户端中使用 {{domxref("navigator.userAgent")}} 获取。 +用户代理字符串可以在客户端通过 {{Glossary("JavaScript")}} 使用 {{domxref("navigator.userAgent")}} 属性进行访问。 -典型的用户代理字符串示例长这样:`"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"`. +典型的用户代理字符串示例如下所示:`"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"`. ## 参见 - 在维基百科上的[用户代理](https://zh.wikipedia.org/wiki/用户代理) -- {{domxref("Navigator/userAgent", "NavigatorID.userAgent")}} -- [使用用户代理检测浏览器](/zh-CN/docs/Web/HTTP/Browser_detection_using_the_user_agent) +- {{domxref("navigator.userAgent")}} +- [使用用户代理进行浏览器检测](/zh-CN/docs/Web/HTTP/Browser_detection_using_the_user_agent) - {{RFC(2616, "", "14.43")}}:`User-Agent` 标头 - {{Glossary("Browser")}}(术语) - HTTP 标头 From 0379079c29df3ae5f8d99935f1bb06dd760ab55c Mon Sep 17 00:00:00 2001 From: Hoarfroster Date: Sat, 13 Jul 2024 21:00:42 +0800 Subject: [PATCH 3/3] feat: improvements Co-authored-by: Jason Ren <40999116+jasonren0403@users.noreply.github.com> --- files/zh-cn/glossary/user_agent/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/zh-cn/glossary/user_agent/index.md b/files/zh-cn/glossary/user_agent/index.md index 9e823d522c8c79..1a6ea8eff4dd05 100644 --- a/files/zh-cn/glossary/user_agent/index.md +++ b/files/zh-cn/glossary/user_agent/index.md @@ -23,6 +23,7 @@ l10n: - {{domxref("navigator.userAgent")}} - [使用用户代理进行浏览器检测](/zh-CN/docs/Web/HTTP/Browser_detection_using_the_user_agent) - {{RFC(2616, "", "14.43")}}:`User-Agent` 标头 -- {{Glossary("Browser")}}(术语) +- 相关术语: + - {{Glossary("Browser", "浏览器")}} - HTTP 标头 - {{HTTPHeader("User-agent")}}