V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
edis0n0
V2EX  ›  程序员

不自己用 fetch 发请求,有办法在 img 标签引入图片的时候往 GET 请求头里加东西吗

  •  
  •   edis0n0 · 2022-12-16 18:00:27 +08:00 · 1085 次点击
    这是一个创建于 468 天前的主题,其中的信息可能已经有所发展或是发生改变。
    6 条回复    2022-12-16 21:30:41 +08:00
    cydian
        1
    cydian  
       2022-12-16 18:00:57 +08:00
    没有
    hazardous
        2
    hazardous  
       2022-12-16 18:03:02 +08:00
    用 cookie
    estk
        3
    estk  
       2022-12-16 18:13:15 +08:00 via iPhone
    除了 cookie 貌似想不出来了,干嘛不用 fetch 或者 xhr ?服务器检测不出你用的是什么方式
    lisongeee
        4
    lisongeee  
       2022-12-16 18:15:22 +08:00
    Service Worker
    edis0n0
        5
    edis0n0  
    OP
       2022-12-16 18:22:46 +08:00
    @estk #3 因为用起来麻烦
    @lisongeee #4 有具体的文档么
    lisongeee
        6
    lisongeee  
       2022-12-16 21:30:41 +08:00   ❤️ 1
    @edis0n0

    > 有具体的文档么

    [service worker intercept request]( https://www.google.com/search?q=service+worker+intercept+request)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1000 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.