How to document an HTTP header - The MDN project 编辑

The MDN HTTP header reference documents HTTP header fields are components of the header section of request and response messages in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction. This page explains how to create a new MDN reference page for an HTTP header.

Prerequisites

  • You will need an MDN account.
  • You will need to know or be able to dive into some HTTP.

Step 1 – find an HTTP header to document

Step 2 – look at existing header reference pages

Step 3 – create a new page

Step 4 – write content

  • Either use a copied structure from one of the existing HTTP header documents that you found in step 2 or start from scratch. It's your choice.
  • Write about your new HTTP header.
  • Make sure you have these sections:
    • Introduction text where the first sentence mentions the header name (bold) and summaries its purpose.
    • Information box containing at least the header type and if the header is a Forbidden header name
    • A syntax box containing all possible directives/parameters/values of the HTTP header.
    • A section that explains these directives/values
    • An example section that contains a practical use case for this header or shows where and how it occurs usually.
    • A specification section listing relevant RFC standard documents.
    • A "See also" section listing relevant resources.

Step 4a –  add tags to the page

  • All HTTP header pages should at least have these tags: "HTTP", "Header", "Reference".
  • If you have looked at other HTTP header pages, you will see that there is a macro that will fill in a browser table for you.
  • The compatibility table page is generated from structured data. If you’d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data/README.md and send us a pull request

Step 6 – add the header to the HTTP header list

Step 7 – ask for review

  • Use the editorial / technical review flags in the editing interface.
  • Ask an MDN contributor for feedback. We will be happily helping you and celebrate the work you have done!

Step 8 – done

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:58 次

字数:6040

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文