更新 AMP 缓存时出现问题
Problems when update AMP cache
根据 Update AMP Cache,URL 与 in
https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp_action=flush&_ts=<ts_val>&_url_signature=<sig_val>
应生成表格。它使用问号?
符号分隔example.com/article?amp_action=
后面的路径和参数
现在我要更新一个url
https://m.discuss.com.hk/amp_viewthread.php?tid=24025060.
它在URL的末尾有一个问号。那么,这里的URL如何构造呢?
我应该将其生成为:
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&_action=flush…
或类似的东西:
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php%3ftid=24025060?amp_action=flush…
您可以在 AMP URL 中使用 URL 查询字符串参数,请参阅
https://developers.google.com/amp/cache/overview#query-parameter-example
您应该能够将原始查询参数与更新缓存参数混合使用。查看 github 讨论 here
所以您的更新 url 将是
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&_action=flush…
根据 Update AMP Cache,URL 与 in
https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp_action=flush&_ts=<ts_val>&_url_signature=<sig_val>
应生成表格。它使用问号?
符号分隔example.com/article?amp_action=
现在我要更新一个url
https://m.discuss.com.hk/amp_viewthread.php?tid=24025060.
它在URL的末尾有一个问号。那么,这里的URL如何构造呢?
我应该将其生成为:
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&_action=flush…
或类似的东西:
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php%3ftid=24025060?amp_action=flush…
您可以在 AMP URL 中使用 URL 查询字符串参数,请参阅 https://developers.google.com/amp/cache/overview#query-parameter-example
您应该能够将原始查询参数与更新缓存参数混合使用。查看 github 讨论 here
所以您的更新 url 将是
…update-cache/c/s/m.discuss.com.hk/amp_viewthread.php?tid=24025060&_action=flush…