返回主题:Web 交付链路优化

知识卡片

问题卡 · 4445

短链跳转影响统计路径

理解等级:高级

永久与临时重定向对浏览器后续访问路径有不同影响:允许客户端复用永久跳转结果可减轻服务负载,但访问不再每次经过短链服务,点击统计更难。书中的解释是设计取舍示意,实际缓存行为仍取决于协议与响应配置。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 短链 · 查看原书依据

      One thing worth discussing here is 301 redirect vs 302 redirect. 301 redirect. A 301 redirect shows that the requested URL is “permanently” moved to the long URL. Since it is permanently redirected, the browser caches the response, and subsequent requests for the same URL will not be sent to the URL shortening service. Instead, requests are redirected to the long URL server directly. 302

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第08章《短链》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0021_split_002.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:One thing worth discussing here is 301 redirect vs 302 redirect. 301 redirect. A 301 redirect shows that the requested URL is “permanently” moved to the long URL. Since it is permanently redirected, the browser caches the response, and subsequent requests for the same URL will not be sent to the URL shortening service. Instead, requests are redirected to the long URL server directly. 302