设为首页收藏本站

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 2704|回复: 6

kangle web server设置 mime类型 最强谷歌优化设置,增加浏览器缓存,加快web访问速度

[复制链接]

签到天数: 2212 天

[LV.Master]伴坛终老

 成长值: 20800
发表于 2014/10/11 00:23 | 显示全部楼层 |阅读模式 | Google Chrome 39.0.2138.3| Windows 8.1
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
下面列举出一些常用的格式,可以更加需要来添加。

3gp video/3gpp 31536000
avi video/x-msvideo 31536000
css text/css yes 31536000
dll application/octet-stream 31536000
doc application/msword 31536000
exe application/octet-stream 31536000
flv video/x-flv 31536000
gif image/gifyes 31536000
gz application/x-tar 31536000
htm text/html yes 31536000
html text/html yes 31536000
ico image/x-iconyes 31536000
jpg image/jpegyes 31536000
js text/javascript yes 31536000
mp3 audio/mpeg 31536000
mp4 video/mp4 31536000
png image/pngyes 31536000
rar application/x-rar-compressed 31536000
sh application/x-sh 31536000
swf application/x-shockwave-flash 31536000
tarapplication/x-tar 31536000
xmltext/xml yes 31536000
zipapplication/x-zip-compressed 31536000
bmpimage/x-bmpyes 31536000
pactext/plainyes 31536000





1.jpg

31536000是谷歌推荐使用的,百度用的315360000(十年)。腾讯用的是600。


谷歌官方文档
http://bbs.itzmx.com/thread-7300-1-1.html



想要所有文本内容,图片都压缩缓存的话,可以改配置文件
  1. <vhs >
  2. <mime_type ext='*' type='text/plain' gzip='1' max_age='31536000'/>
  3. <mime_type ext='3gp' type='video/3gpp' max_age='31536000'/>
  4. <mime_type ext='3gpp' type='video/3gpp' max_age='31536000'/>
  5. <mime_type ext='ai' type='application/postscript' max_age='31536000'/>
  6. <mime_type ext='aif' type='audio/x-aiff' max_age='31536000'/>
  7. <mime_type ext='aifc' type='audio/x-aiff' max_age='31536000'/>
  8. <mime_type ext='aiff' type='audio/x-aiff' max_age='31536000'/>
  9. <mime_type ext='amr' type='audio/amr' max_age='31536000'/>
  10. <mime_type ext='arj' type='application/x-arj-compressed' max_age='31536000'/>
  11. <mime_type ext='atom' type='application/atom+xml' max_age='31536000'/>
  12. <mime_type ext='au' type='audio/basic' max_age='31536000'/>
  13. <mime_type ext='avi' type='video/x-msvideo' max_age='31536000'/>
  14. <mime_type ext='bcpio' type='application/x-bcpio' max_age='31536000'/>
  15. <mime_type ext='bin' type='application/macbinary' max_age='31536000'/>
  16. <mime_type ext='bmp' type='image/x-bmp' gzip='1' max_age='31536000'/>
  17. <mime_type ext='c' type='text/plain' gzip='1' max_age='31536000'/>
  18. <mime_type ext='cab' type='application/octet-stream' max_age='31536000'/>
  19. <mime_type ext='cc' type='text/plain' gzip='1' max_age='31536000'/>
  20. <mime_type ext='cdf' type='application/x-netcdf' max_age='31536000'/>
  21. <mime_type ext='cod' type='text/x-co-desc' gzip='1' max_age='31536000'/>
  22. <mime_type ext='core' type='application/octet-stream' max_age='31536000'/>
  23. <mime_type ext='cpio' type='application/x-cpio' max_age='31536000'/>
  24. <mime_type ext='cpp' type='text/plain' gzip='1' max_age='31536000'/>
  25. <mime_type ext='csh' type='application/x-csh' max_age='31536000'/>
  26. <mime_type ext='css' type='text/css' gzip='1' max_age='31536000'/>
  27. <mime_type ext='dll' type='application/octet-stream' max_age='31536000'/>
  28. <mime_type ext='doc' type='application/msword' max_age='31536000'/>
  29. <mime_type ext='dvi' type='application/x-dvi' max_age='31536000'/>
  30. <mime_type ext='ear' type='application/java-archive' max_age='31536000'/>
  31. <mime_type ext='eps' type='application/postscript' max_age='31536000'/>
  32. <mime_type ext='etx' type='text/x-setext' gzip='1' max_age='31536000'/>
  33. <mime_type ext='exe' type='application/octet-stream' max_age='31536000'/>
  34. <mime_type ext='f90' type='text/plain' gzip='1' max_age='31536000'/>
  35. <mime_type ext='flv' type='video/x-flv' max_age='31536000'/>
  36. <mime_type ext='gif' type='image/gif' gzip='1' max_age='31536000'/>
  37. <mime_type ext='gtar' type='application/x-gtar' max_age='31536000'/>
  38. <mime_type ext='gz' type='application/x-tar' max_age='31536000'/>
  39. <mime_type ext='h' type='text/plain' gzip='1' max_age='31536000'/>
  40. <mime_type ext='hdf' type='application/x-hdf' max_age='31536000'/>
  41. <mime_type ext='hh' type='text/plain' gzip='1' max_age='31536000'/>
  42. <mime_type ext='hqx' type='application/mac-binhex40' max_age='31536000'/>
  43. <mime_type ext='htm' type='text/html' gzip='1' max_age='31536000'/>
  44. <mime_type ext='html' type='text/html' gzip='1' max_age='31536000'/>
  45. <mime_type ext='ico' type='image/x-icon' gzip='1' max_age='31536000'/>
  46. <mime_type ext='ief' type='image/ief' gzip='1' max_age='31536000'/>
  47. <mime_type ext='jad' type='text/vnd.sun.j2me.app-descriptor' gzip='1' max_age='31536000'/>
  48. <mime_type ext='jar' type='application/java-archive' max_age='31536000'/>
  49. <mime_type ext='jng' type='image/x-jng' gzip='1' max_age='31536000'/>
  50. <mime_type ext='jpe' type='image/jpeg' gzip='1' max_age='31536000'/>
  51. <mime_type ext='jpeg' type='image/jpeg' gzip='1' max_age='31536000'/>
  52. <mime_type ext='jpg' type='image/jpeg' gzip='1' max_age='31536000'/>
  53. <mime_type ext='js' type='application/x-javascript' gzip='1' max_age='31536000'/>
  54. <mime_type ext='latex' type='application/x-latex' max_age='31536000'/>
  55. <mime_type ext='lha' type='application/x-lha-compressed' max_age='31536000'/>
  56. <mime_type ext='lsm' type='text/plain' gzip='1' max_age='31536000'/>
  57. <mime_type ext='lzh' type='application/x-lha-compressed' max_age='31536000'/>
  58. <mime_type ext='m' type='text/plain' gzip='1' max_age='31536000'/>
  59. <mime_type ext='man' type='application/x-troff-man' max_age='31536000'/>
  60. <mime_type ext='mbm' type='image/x-epoc-mbm' gzip='1' max_age='31536000'/>
  61. <mime_type ext='me' type='application/x-troff-me' max_age='31536000'/>
  62. <mime_type ext='mid' type='audio/midi' max_age='31536000'/>
  63. <mime_type ext='midi' type='audio/midi' max_age='31536000'/>
  64. <mime_type ext='mif' type='application/x-mif' max_age='31536000'/>
  65. <mime_type ext='mmf' type='application/x-smaf' max_age='31536000'/>
  66. <mime_type ext='mml' type='text/mathml' gzip='1' max_age='31536000'/>
  67. <mime_type ext='mov' type='video/quicktime' max_age='31536000'/>
  68. <mime_type ext='movie' type='video/x-sgi-movie' max_age='31536000'/>
  69. <mime_type ext='mp2' type='audio/basic' max_age='31536000'/>
  70. <mime_type ext='mp3' type='audio/mpeg' max_age='31536000'/>
  71. <mime_type ext='mp4' type='video/mp4' max_age='31536000'/>
  72. <mime_type ext='mpe' type='video/mpeg' max_age='31536000'/>
  73. <mime_type ext='mpeg' type='video/mpeg' max_age='31536000'/>
  74. <mime_type ext='mpg' type='video/mpeg' max_age='31536000'/>
  75. <mime_type ext='ms' type='application/x-troff-ms' max_age='31536000'/>
  76. <mime_type ext='msw' type='application/msword' max_age='31536000'/>
  77. <mime_type ext='mwrt' type='application/macwriteii' max_age='31536000'/>
  78. <mime_type ext='n3a' type='image/vnd.nok-3dscreensaver' gzip='1' max_age='31536000'/>
  79. <mime_type ext='nc' type='application/x-netcdf' max_age='31536000'/>
  80. <mime_type ext='ngd' type='application/x-nokiagamedata' max_age='31536000'/>
  81. <mime_type ext='nok' type='image/vnd.nok-oplogo-colornokia-op-logo' gzip='1' max_age='31536000'/>
  82. <mime_type ext='nqd' type='application/vnd.nokia.gamedata' max_age='31536000'/>
  83. <mime_type ext='oda' type='application/oda' max_age='31536000'/>
  84. <mime_type ext='pbm' type='image/x-portable-bitmap' gzip='1' max_age='31536000'/>
  85. <mime_type ext='pdf' type='application/pdf' max_age='31536000'/>
  86. <mime_type ext='pgm' type='image/x-portable-graymap' gzip='1' max_age='31536000'/>
  87. <mime_type ext='pic' type='application/pict' max_age='31536000'/>
  88. <mime_type ext='pict' type='application/pict' max_age='31536000'/>
  89. <mime_type ext='pmd' type='application/x-pmd' max_age='31536000'/>
  90. <mime_type ext='png' type='image/png' gzip='1' max_age='31536000'/>
  91. <mime_type ext='pnm' type='image/x-portable-anymap' gzip='1' max_age='31536000'/>
  92. <mime_type ext='ppm' type='image/x-portable-pixmap' gzip='1' max_age='31536000'/>
  93. <mime_type ext='ps' type='application/postscript' max_age='31536000'/>
  94. <mime_type ext='qcp' type='audio/vnd.qcelp' max_age='31536000'/>
  95. <mime_type ext='qt' type='video/quicktime' max_age='31536000'/>
  96. <mime_type ext='rar' type='application/x-rar-compressed' max_age='31536000'/>
  97. <mime_type ext='ras' type='image/cmu-raster' gzip='1' max_age='31536000'/>
  98. <mime_type ext='rgb' type='image/x-rgb' gzip='1' max_age='31536000'/>
  99. <mime_type ext='rng' type='application/vnd.nokie.ringing-tone' max_age='31536000'/>
  100. <mime_type ext='roff' type='application/x-troff' max_age='31536000'/>
  101. <mime_type ext='rpm' type='application/x-rpm' max_age='31536000'/>
  102. <mime_type ext='rss' type='application/rss+xml' max_age='31536000'/>
  103. <mime_type ext='rtf' type='application/x-rtf' max_age='31536000'/>
  104. <mime_type ext='rtx' type='text/richtext' gzip='1' max_age='31536000'/>
  105. <mime_type ext='sh' type='application/x-sh' max_age='31536000'/>
  106. <mime_type ext='shar' type='application/x-shar' max_age='31536000'/>
  107. <mime_type ext='si' type='text/vnd.wap.si' gzip='1' max_age='31536000'/>
  108. <mime_type ext='sic' type='application/vnd.wap.sic' max_age='31536000'/>
  109. <mime_type ext='sis' type='application/vnd.symbian.install' max_age='31536000'/>
  110. <mime_type ext='sit' type='application/stuffit' max_age='31536000'/>
  111. <mime_type ext='sl' type='text/vnd.wap.sl' gzip='1' max_age='31536000'/>
  112. <mime_type ext='slc' type='application/vnd.wap.slc' max_age='31536000'/>
  113. <mime_type ext='snd' type='audio/basic' max_age='31536000'/>
  114. <mime_type ext='src' type='application/x-wais-source' max_age='31536000'/>
  115. <mime_type ext='sv4cpio' type='application/x-sv4cpio' max_age='31536000'/>
  116. <mime_type ext='sv4crc' type='application/x-sv4crc' max_age='31536000'/>
  117. <mime_type ext='svg' type='image/svg+xml' gzip='1' max_age='31536000'/>
  118. <mime_type ext='svgz' type='image/svg+xml' gzip='1' max_age='31536000'/>
  119. <mime_type ext='swf' type='application/x-shockwave-flash' max_age='31536000'/>
  120. <mime_type ext='t' type='application/x-troff' max_age='31536000'/>
  121. <mime_type ext='tar' type='application/x-tar' max_age='31536000'/>
  122. <mime_type ext='tcl' type='application/x-tcl' max_age='31536000'/>
  123. <mime_type ext='tex' type='application/x-tex' max_age='31536000'/>
  124. <mime_type ext='texi' type='application/x-texinfo' max_age='31536000'/>
  125. <mime_type ext='texinfo' type='application/x-texinfo' max_age='31536000'/>
  126. <mime_type ext='tgz' type='application/x-tar' max_age='31536000'/>
  127. <mime_type ext='tif' type='image/tiff' gzip='1' max_age='31536000'/>
  128. <mime_type ext='tiff' type='image/tiff' gzip='1' max_age='31536000'/>
  129. <mime_type ext='tr' type='application/x-troff' max_age='31536000'/>
  130. <mime_type ext='tsv' type='text/tab-separated-values' gzip='1' max_age='31536000'/>
  131. <mime_type ext='ustar' type='application/x-ustar' max_age='31536000'/>
  132. <mime_type ext='vcf' type='text/v-vcard' gzip='1' max_age='31536000'/>
  133. <mime_type ext='vcs' type='text/x-vcalendar' gzip='1' max_age='31536000'/>
  134. <mime_type ext='war' type='application/java-archive' max_age='31536000'/>
  135. <mime_type ext='wav' type='audio/x-wav' max_age='31536000'/>
  136. <mime_type ext='wbmp' type='image/vnd.wap.wmbp' gzip='1' max_age='31536000'/>
  137. <mime_type ext='webm' type='video/webm' max_age='31536000'/>
  138. <mime_type ext='webp' type='image/webp' gzip='1' max_age='31536000'/>
  139. <mime_type ext='wml' type='text/vnd.wap.wml' gzip='1' max_age='31536000'/>
  140. <mime_type ext='wmlc' type='application/vnd.wap.wmlc' max_age='31536000'/>
  141. <mime_type ext='wmls' type='text/vnd.wap.wmlscript' gzip='1' max_age='31536000'/>
  142. <mime_type ext='wmlsc' type='text/vnd.wap.wmlscript' gzip='1' max_age='31536000'/>
  143. <mime_type ext='wmv' type='video/x-ms-wmv' max_age='31536000'/>
  144. <mime_type ext='xbm' type='image/x-xbitmap' gzip='1' max_age='31536000'/>
  145. <mime_type ext='xls' type='application/msexcel' max_age='31536000'/>
  146. <mime_type ext='xml' type='text/xml' gzip='1' max_age='31536000'/>
  147. <mime_type ext='xpm' type='image/x-xpixmap' gzip='1' max_age='31536000'/>
  148. <mime_type ext='xwd' type='image/x-xwindowdump' gzip='1' max_age='31536000'/>
  149. <mime_type ext='Z' type='application/x-tar' max_age='31536000'/>
  150. <mime_type ext='zip' type='application/x-zip-compressed' max_age='31536000'/>
  151. <mime_type ext='zlib' type='application/x-deflate' max_age='31536000'/>
  152. </vhs>
复制代码


欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

洎虐的我 该用户已被删除
发表于 2014/10/11 00:23 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 22 天

[LV.4]偶尔看看III

发表于 2014/10/11 18:25 | 显示全部楼层 | Google Chrome 34.0.1847.137| Windows 7
收了,待会去测试下
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 38 天

[LV.5]常住居民I

发表于 2016/11/17 17:46 | 显示全部楼层 |Google Chrome 45.0.2454.101|Windows 7
怎么修改???
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 2212 天

[LV.Master]伴坛终老

 成长值: 20800
发表于 2016/11/17 19:18 | 显示全部楼层 |Google Chrome 45.0.2454.101|Windows 7

3311
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 38 天

[LV.5]常住居民I

发表于 2016/11/17 20:35 | 显示全部楼层 |Google Chrome 45.0.2454.101|Windows 7

这里只能一个个的修改。,我想全部改成谷歌推荐的
[发帖际遇]: 一个袋子砸在了 sinerogue 头上,sinerogue 赚了 2 樱币. 幸运榜 / 衰神榜
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 2212 天

[LV.Master]伴坛终老

 成长值: 20800
发表于 2016/11/18 19:11 | 显示全部楼层 |Google Chrome 53.0.2785.143|Windows 7
sinerogue 发表于 2016/11/17 20:35
这里只能一个个的修改。,我想全部改成谷歌推荐的

配置文件,直接覆盖下方
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 用百度帐号登录新浪微博账号登陆

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2018/1/23 00:06 , Processed in 0.280643 second(s), 42 queries , Gzip On, Apc On.

Powered by itzmx!

© 2011-2013 sakura

快速回复 返回顶部 返回列表