Home  >  Article  >  Backend Development  >  我有个事情我移植想不明白

我有个事情我移植想不明白

WBOY
WBOYOriginal
2016-06-23 13:56:00741browse

为什么我客户端通过http请求   服务端 服务端发张图片到客户端 这个传输为什么那么慢一共也就300多kb   但一共传了5秒多
如果直接在网页通过get_files_contents  用浏览器打开 2秒足够了   我真想不明白


回复讨论(解决方案)

肯定在某个地方缓存了
你的测试php用框架或者CMS了吗?
firebug或者其他工具截一下2种数据包,对比head部分Last-Modified,Cache-control有什么不同?
测试的时候尽量清空缓存后再刷新,F5仍然会对比Last-Modified利用缓存

那要看你的代码是怎么写的了。

不懂。。 你们的意思是速度应该是一样?

你没有把问题说清楚

你没有把问题说清楚

比方说 游戏客户端c++写的       服务器php图片 发给客户端    很慢        如果客户端用网页 直接打开速度快很多

要看每次?送的字??。如果很小,就要分很多次?,??就慢了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn