【问题标题】:amp-pixel is lost in AMP Cacheamp-pixel 在 AMP 缓存中丢失
【发布时间】:2021-02-23 05:33:13
【问题描述】:

为什么像这样的 amp-pixel 标记会在 AMP 缓存中丢失?

<amp-pixel src="https://amp.abendzeitung-muenchen.de/_CPiX/art-706352-60/706352.gif?RANDOM" layout="nodisplay" class="i-amphtml-element i-amphtml-layout-nodisplay i-amphtml-built" i-amphtml-layout="nodisplay" aria-hidden="true" hidden=""></amp-pixel>

这里是原始网站的链接(您可以找到 amp-pixel 标签) https://amp.abendzeitung-muenchen.de/muenchen/vorlaeufiger-corona-kassensturz-fast-tausend-euro-pro-kopf-verschuldung-in-muenchen-art-706352

以及 AMP 缓存中指向同一网站的链接(amp-pixel 标记已消失) https://amp-abendzeitung--muenchen-de.cdn.ampproject.org/c/s/amp.abendzeitung-muenchen.de/muenchen/vorlaeufiger-corona-kassensturz-fast-tausend-euro-pro-kopf-verschuldung-in-muenchen-art-706352

【问题讨论】:

    标签: caching amp-html


    【解决方案1】:

    缓存服务于您页面的陈旧版本。如果您缓存了 URL,例如:https://amp-abendzeitung--muenchen-de.cdn.ampproject.org/c/s/amp.abendzeitung-muenchen.de/muenchen/vorlaeufiger-corona-kassensturz-fast-tausend-euro-pro-kopf-verschuldung-in-muenchen-art-706352?asdfasdfsa,您将获得 amp-pixel。

    我建议提供具有较低 max-age 的 AMP 网页,以确保快速传播更改。

    【讨论】:

    • 非常感谢您的回答。但我不认为原因仅仅是页面的陈旧版本。我对其他页面进行了很多测试。并且 amp-pixel 存在于开头和来自 amp-cache 的 18-30 个请求(具有完全相同的 URL)之后,它会丢失。也许它与 HTTP 标头字段有关。但到目前为止,我找不到具体的字段或导致 amp 缓存摆脱 amp-pixel 的条件。
    猜你喜欢
    • 2018-11-07
    • 2020-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多