喜糖

移动开发工程师 。涉及 android、ios、jni
随笔 - 275, 文章 - 0, 评论 - 24, 阅读 - 56万

导航

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

08 2012 档案

摘要:闲话少说,还是先来看一下为什么要使用GZip吧,HTTP协议上的GZIP编码是一种用来改进WEB应用程序性能的技术。大流量的WEB站点常常使用GZIP压缩技术来减少文件大小,减少文件大小有两个明显的好处,一是可以减少存储空间,二是通过网络传输文件时,可以减少传输的时间。1、那如何在HTTP请求中使用GZip呢?一般来说,在HTTP连接中,并不是所有的接收者都支持GZip格式的,所以根据HTTP协议,如果你可以处理GZip格式,并且希望服务器以GZip的格式来返回内容,需要在HTTP的请求的Header中声明"Accept-Encoding"为"gzip" 阅读全文

posted @ 2012-08-15 18:28 喜糖 阅读(538) 评论(0) 推荐(0) 编辑

摘要:public static boolean isConnectionFast(int type, int subType){ if(type==ConnectivityManager.TYPE_WIFI){ System.out.println("CONNECTED VIA WIFI"); return true; }else if(type==ConnectivityManager.TYPE_MOBILE){ switch(subType){ case TelephonyMan... 阅读全文

posted @ 2012-08-07 11:57 喜糖 阅读(287) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示