-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zh-CN: update Glossary/User_agent #22263
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
--- | ||
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) | ||
- {{domxref("Navigator/userAgent", "NavigatorID.userAgent")}} | ||
- [使用用户代理检测浏览器](/zh-CN/docs/Web/HTTP/Browser_detection_using_the_user_agent) | ||
- 在维基百科上的[用户代理](https://zh.wikipedia.org/wiki/用户代理) | ||
- {{domxref("navigator.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")}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更新一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(其实是考虑过一阵子batch replace的(一篇篇对比commitHash),现在update到时候难免还是得再瞅瞅中间有没有差内容)