chrome上对wininet和winhtp的区别的说明

本文探讨了WinHTTP和WinInet两个Windows网络编程接口的优缺点。WinHTTP拥有更清晰的API和支持,允许实现自定义缓存,但存在非ASCII URL编码和Keep-Alive连接的问题。相比之下,WinInet虽然API较为复杂且文档不全,但它经过了IE浏览器的长期实战验证。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. Both come with all Windows versions we plan to support (Win2K and later).
  2. WinHTTP is better documented. WinInet has a more difficult API and spotty documentation.
  3. WinHTTP has a cleaner API with the support we need. A number of WinInet functions that are necessary for us (for example, for SSL state) are undocumented and unsupported, even though IE uses them.
  4. WinHTTP allows us to implement our own cache. WinInet always shares a cache with IE. We would like to control our own caching, and also sharing a cache with IE can cause problems since some sites may serve browser-specific pages.
  5. WinInet is better battle tested on account of being used by IE. WinHTTP is not used very much, and was designed for server use. It has problems with non-ASCII URL encodings sent by the server and keepalive connections. We have to provide workarounds for these issues.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值