同样一个 PNG 图片, IE 谷歌 迅雷下载的文件都不一样?请帮分析下

2018-10-30 12:09:04 +08:00
 hwuion

网址: https://www.amd.com/system/files/102426-wraith-prism-cooler-1260x709.png IE 下载下来 106K,Win7 Win10 可以打开,Win7 画图软件打不开 迅雷下来下来的 321K,Win7 Win10 可以打开,Win7 画图软件可打开 谷歌浏览器下载下来 34K,Win7 打不开,画图软件打不开,Win10 可以

请帮忙分下下哪里原因

1348 次点击
所在节点    问与答
4 条回复
wsh1108
2018-10-30 12:26:13 +08:00
我猜一下,可能你下回来的格式并不是 png 格式的,有个软件可以看文件的开头字符,这个字符和图片格式相对应。具体 google
crab
2018-10-30 12:28:41 +08:00
User-Agent 不一样,响应不同类型。
Content-Type: image/webp
Content-Type: image/png
azh7138m
2018-10-30 13:25:33 +08:00
2 楼说得对

curl -I https://www.amd.com/system/files/102426-wraith-prism-cooler-1260x709.png -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'
HTTP/2 200
last-modified: Fri, 14 Sep 2018 06:43:00 UTC
server: Akamai Image Manager
content-length: 34776
content-type: image/webp
cache-control: private, no-transform, max-age=86400
expires: Wed, 31 Oct 2018 05:24:22 GMT
date: Tue, 30 Oct 2018 05:24:22 GMT
set-cookie: pmuser_country=cn; expires=Tue, 13-Nov-2018 05:24:22 GMT


curl -I https://www.amd.com/system/files/102426-wraith-prism-cooler-1260x709.png
HTTP/2 200
last-modified: Fri, 14 Sep 2018 06:43:00 UTC
server: Akamai Image Manager
content-length: 328477
content-type: image/png
cache-control: private, no-transform, max-age=86400
expires: Wed, 31 Oct 2018 05:22:19 GMT
date: Tue, 30 Oct 2018 05:22:19 GMT
set-cookie: pmuser_country=cn; expires=Tue, 13-Nov-2018 05:22:19 GMT


话说这个居然忽略 accept 的.......
hwuion
2018-10-30 14:16:32 +08:00
IE 下载的的确是 webp 模式的。
迅雷下载的 321K png 文件倒是搞不清

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/502498

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX