【问题标题】:Problems when update AMP cache更新 AMP 缓存时的问题
【发布时间】:2019-12-16 18:47:58
【问题描述】:

根据Update AMP Cache,一个带有in的URL

https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp_action=flush&amp_ts=<ts_val>&amp_url_signature=<sig_val>

应该生成表单。它使用问号?符号分隔example.com/article?amp_action=后面的路径和参数

现在我想更新一个网址

https://m.discuss.com.hk/amp_viewthread.php?tid=24025060. 

网址末尾有一个问号。那么,这里的URL如何构造呢?

我应该将其生成为:

…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&amp_action=flush…

或者类似的东西:

…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php%3ftid=24025060?amp_action=flush…

【问题讨论】:

    标签: amp-html


    【解决方案1】:

    您可以在 AMP URL 中使用 URL 查询字符串参数,请参阅 https://developers.google.com/amp/cache/overview#query-parameter-example

    您应该能够将原始查询参数与更新缓存参数混合在一起。查看github讨论here

    所以你的更新网址将是

    …update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&amp_action=flush…
    

    【讨论】:

    • 非常感谢!我认为这是正确的解决方案,现在效果很好。
    猜你喜欢
    • 2018-11-07
    • 2015-09-11
    • 2018-09-16
    • 2011-06-30
    • 2011-07-08
    • 1970-01-01
    • 1970-01-01
    • 2011-02-01
    • 1970-01-01
    相关资源
    最近更新 更多