http请求头
来源:互联网 发布:js调用输入法 编辑:程序博客网 时间:2024/06/05 18:34
今天的内容首先是http协议其中包括请求头(request)和响应头(response)
请求头中包含:
Accept: 告诉服务器,浏览器所支持的数据类型
Accept-Charset: 告诉服务器,浏览器支持的字符集
Accept-Encoding: 告诉服务器,浏览器所支持的数据解压算法
Accept-Language: 告诉服务器,客户端的语言环境。
Host: 告诉服务器,浏览器访问服务器上的哪台主机
If-Modified-Since: 告诉服务器,缓存网页的时间
Referer: 告诉服务器,浏览器是从哪个网页来的
User-Agent: 告诉服务器,浏览器的版本
响应头中包含:
Location: 用于浏览器去找哪个资源
Server: 服务器是什么类型的服务器
Content-Encoding: 用于告诉浏览器,数据的压缩类型
Content-Length: 用于告诉浏览器,服务器回送的数据大小
Content-Language
Content-Type: 用于告诉浏览器,服务器回送的数据类型
Last-Modified: 用于告诉浏览器,数据的最后更新时间
Refresh: 通知浏览器,刷新回送数据
Content-Disposition: 通知浏览器,以下载的方法打开回送的数据
Expires: -1告诉浏览器回送数据的缓存多长时间,如果值为0或为负数的话,就是不缓存.
Cache-Control: no-cache 通知浏览器不要缓存数据
Pragma: no-cache 通知浏览器不要缓存数据
String content = "asdfasdfawefasdfasdfasdf
asdfasdfasdf";
ByteArrayOutputStream bout = new ByteArrayOutputStream();
GZIPOutputStream gout = new GZIPOutputStream(bout);
gout.write(content.getBytes());
gout.close();
请求头中包含:
Accept: 告诉服务器,浏览器所支持的数据类型
Accept-Charset: 告诉服务器,浏览器支持的字符集
Accept-Encoding: 告诉服务器,浏览器所支持的数据解压算法
Accept-Language: 告诉服务器,客户端的语言环境。
Host: 告诉服务器,浏览器访问服务器上的哪台主机
If-Modified-Since: 告诉服务器,缓存网页的时间
Referer: 告诉服务器,浏览器是从哪个网页来的
User-Agent: 告诉服务器,浏览器的版本
响应头中包含:
Location: 用于浏览器去找哪个资源
Server: 服务器是什么类型的服务器
Content-Encoding: 用于告诉浏览器,数据的压缩类型
Content-Length: 用于告诉浏览器,服务器回送的数据大小
Content-Language
Content-Type: 用于告诉浏览器,服务器回送的数据类型
Last-Modified: 用于告诉浏览器,数据的最后更新时间
Refresh: 通知浏览器,刷新回送数据
Content-Disposition: 通知浏览器,以下载的方法打开回送的数据
Expires: -1告诉浏览器回送数据的缓存多长时间,如果值为0或为负数的话,就是不缓存.
Cache-Control: no-cache 通知浏览器不要缓存数据
Pragma: no-cache 通知浏览器不要缓存数据
String content = "asdfasdfawefasdfasdfasdf
asdfasdfasdf";
ByteArrayOutputStream bout = new ByteArrayOutputStream();
GZIPOutputStream gout = new GZIPOutputStream(bout);
gout.write(content.getBytes());
gout.close();
- http请求头响应头
- Http请求头、响应头
- HTTP请求头概述
- HTTP请求头概述
- 读取HTTP请求头
- HTTP请求-头信息
- 读取HTTP请求头
- 读取HTTP请求头
- HTTP请求头
- HTTP请求头概述
- http请求头
- HTTP请求头概述
- HTTP请求头概述
- HTTP请求头详解
- HTTP 请求头概述
- HTTP请求头详解
- http请求头
- Http请求/响应头
- 如何选择网站的锚文本
- PlayBook模拟器的安装与设置
- PeekMessage & GetMessage
- matlab false(N)
- 收集的好的iphone开发个人博客地址(不断更新中)
- http请求头
- 居然不能再用live写博了
- 导入数据到不同表空间的问题!(unlimited tablespace 权限在作怪)
- java annotation高级应用
- android小记之手动安装apk
- Android 释放内存中的图片资源
- 弄懂dup2函数
- 新的感悟
- windows下搭建iphone开发环境