Rerendering pages on MDN - The MDN project 编辑

The MDN site caches pages for performance reasons. As a result, changes that you save to a page might not appear when you next reload the page. Often, but not always, a banner appears on the page indicating that an update of the page is in process. You can do a "force refresh" in your browser to reload the page from the server, but this may have no effect if the update on the server has not completed.

Some pages (especially landing pages) use macros to  automatically generate and update their content. For landing pages, doing this ensures that new articles are automatically listed on the page, without a writer having to manually add them. This is a helpful convenience for long-time contributors, and helps newcomers avoid having their work lost in the shuffle because they didn't know how to link their articles into the site hierarchy.

This can also be used when transcluding content from one page into other pages (using, for example, the Page macro).

Because MDN caches rendered content for performance reasons, changes made to source material (such as macro output or transcluded pages) are not automatically reflected in the page. If you expect frequent changes to such source materials, you might want to consider enabling automatic regeneration of your page.

To enable automatic regeneration:

  1. Click the Edit button on the page to enter edit mode.
  2. Under the page title, click Edit page title and properties located near the page title. The page metadata fields appear.
  3. Set a  value for Rendering max age. This value determines the schedule on which the cached page is rebuilt, including re-running its macros. Typically, we use 4 or 8 hours for this. For a technology whose documentation is changing rapidly, you might choose a lower number.
  4. Save your changes to the page. It's a good practice to make a revision comment describing what you did, such as "Set rendering max age to 4 hours". 

The page will get regenerated automatically on the schedule you specified.

Note: The "Edit page title and properties" option is not available when creating a new page; you'll have to re-open the editor after your first save.

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

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

发布评论

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

词条统计

浏览:75 次

字数:2464

最后编辑:8年前

编辑次数:0 次

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