??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久久久秋霞鲁丝,亚洲影视一区二区三区,电影午夜精品一区二区三区http://www.aygfsteel.com/BearRui/archive/2010/05/19/flush_chunk_encoding.htmlBearRui(AK-47)BearRui(AK-47)Wed, 19 May 2010 14:38:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/05/19/flush_chunk_encoding.htmlhttp://www.aygfsteel.com/BearRui/comments/321369.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/05/19/flush_chunk_encoding.html#Feedback1http://www.aygfsteel.com/BearRui/comments/commentRss/321369.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/321369.html阅读全文

BearRui(AK-47) 2010-05-19 22:38 发表评论
]]>
WEB高性能开?10) - 疯狂的HTML压羃http://www.aygfsteel.com/BearRui/archive/2010/05/16/html_compressor.htmlBearRui(AK-47)BearRui(AK-47)Sun, 16 May 2010 09:16:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/05/16/html_compressor.htmlhttp://www.aygfsteel.com/BearRui/comments/321100.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/05/16/html_compressor.html#Feedback13http://www.aygfsteel.com/BearRui/comments/commentRss/321100.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/321100.html阅读全文

BearRui(AK-47) 2010-05-16 17:16 发表评论
]]>
该如何加载google-analytics(或其他第三方)的JShttp://www.aygfsteel.com/BearRui/archive/2010/05/13/best_use_google_analytics.htmlBearRui(AK-47)BearRui(AK-47)Thu, 13 May 2010 02:10:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/05/13/best_use_google_analytics.htmlhttp://www.aygfsteel.com/BearRui/comments/320702.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/05/13/best_use_google_analytics.html#Feedback7http://www.aygfsteel.com/BearRui/comments/commentRss/320702.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/320702.html的最后面完?包括 博客园、CSDN、BlogJava)。可是ga自动生成的这DJS真的是最合理的吗Q?nbsp; 阅读全文

BearRui(AK-47) 2010-05-13 10:10 发表评论
]]>
高性能WEB开?8) - 面呈现、重l、回?/title><link>http://www.aygfsteel.com/BearRui/archive/2010/05/10/web_performance_repaint_relow.html</link><dc:creator>BearRui(AK-47)</dc:creator><author>BearRui(AK-47)</author><pubDate>Mon, 10 May 2010 09:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/BearRui/archive/2010/05/10/web_performance_repaint_relow.html</guid><wfw:comment>http://www.aygfsteel.com/BearRui/comments/320502.html</wfw:comment><comments>http://www.aygfsteel.com/BearRui/archive/2010/05/10/web_performance_repaint_relow.html#Feedback</comments><slash:comments>25</slash:comments><wfw:commentRss>http://www.aygfsteel.com/BearRui/comments/commentRss/320502.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/BearRui/services/trackbacks/320502.html</trackback:ping><description><![CDATA[     摘要: 面呈现程 <br> <br>回流与重l?<br> <br>什么操作会引v重绘、回?<br> <br>聪明的浏览器 <br> <br>如何减少回流、重l?<br> <br>实例试  <a href='http://www.aygfsteel.com/BearRui/archive/2010/05/10/web_performance_repaint_relow.html'>阅读全文</a><img src ="http://www.aygfsteel.com/BearRui/aggbug/320502.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/BearRui/" target="_blank">BearRui(AK-47)</a> 2010-05-10 17:24 <a href="http://www.aygfsteel.com/BearRui/archive/2010/05/10/web_performance_repaint_relow.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>高性能WEB开?7) - JS、CSS的合q、压~、缓存管?/title><link>http://www.aygfsteel.com/BearRui/archive/2010/05/04/js_css_merge_compress_cache.html</link><dc:creator>BearRui(AK-47)</dc:creator><author>BearRui(AK-47)</author><pubDate>Tue, 04 May 2010 05:28:00 GMT</pubDate><guid>http://www.aygfsteel.com/BearRui/archive/2010/05/04/js_css_merge_compress_cache.html</guid><wfw:comment>http://www.aygfsteel.com/BearRui/comments/320036.html</wfw:comment><comments>http://www.aygfsteel.com/BearRui/archive/2010/05/04/js_css_merge_compress_cache.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.aygfsteel.com/BearRui/comments/commentRss/320036.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/BearRui/services/trackbacks/320036.html</trackback:ping><description><![CDATA[     摘要: 本篇文章主要讨论下目前JS,CSS 合ƈ、压~、缓存管理存在的一些问题,然后分n下自己项目中用到?个处理方案,q提?个实例下载?nbsp; <a href='http://www.aygfsteel.com/BearRui/archive/2010/05/04/js_css_merge_compress_cache.html'>阅读全文</a><img src ="http://www.aygfsteel.com/BearRui/aggbug/320036.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/BearRui/" target="_blank">BearRui(AK-47)</a> 2010-05-04 13:28 <a href="http://www.aygfsteel.com/BearRui/archive/2010/05/04/js_css_merge_compress_cache.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>高性能WEB开?6) - web性能试工具推荐http://www.aygfsteel.com/BearRui/archive/2010/04/28/web_performance_tools.htmlBearRui(AK-47)BearRui(AK-47)Wed, 28 Apr 2010 04:57:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/04/28/web_performance_tools.htmlhttp://www.aygfsteel.com/BearRui/comments/319590.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/04/28/web_performance_tools.html#Feedback12http://www.aygfsteel.com/BearRui/comments/commentRss/319590.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/319590.html阅读全文

BearRui(AK-47) 2010-04-28 12:57 发表评论
]]>
高性能WEB开发系?/title><link>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance.html</link><dc:creator>BearRui(AK-47)</dc:creator><author>BearRui(AK-47)</author><pubDate>Mon, 26 Apr 2010 15:55:00 GMT</pubDate><guid>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance.html</guid><wfw:comment>http://www.aygfsteel.com/BearRui/comments/319409.html</wfw:comment><comments>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.aygfsteel.com/BearRui/comments/commentRss/319409.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/BearRui/services/trackbacks/319409.html</trackback:ping><description><![CDATA[     摘要: 准备写一pd关于高性能WEB开发的日记Q主要是跟前端技术相关的(html,http,js,css{?Q将自己了解的一些知识做1个ȝ和记录ƈ分nQ希 <br> <br>望大家能喜欢Q也喜欢自己能坚持写下去。当然因个h技术水qx限,写作能力更是非常差,所以如果有什么地方写得不好的Q请大家都指Ҏ炏V?nbsp; <a href='http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance.html'>阅读全文</a><img src ="http://www.aygfsteel.com/BearRui/aggbug/319409.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/BearRui/" target="_blank">BearRui(AK-47)</a> 2010-04-26 23:55 <a href="http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>高性能WEB开?5) - 减少hQ响应的数据?/title><link>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance_reduce_weight.html</link><dc:creator>BearRui(AK-47)</dc:creator><author>BearRui(AK-47)</author><pubDate>Mon, 26 Apr 2010 11:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance_reduce_weight.html</guid><wfw:comment>http://www.aygfsteel.com/BearRui/comments/319408.html</wfw:comment><comments>http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance_reduce_weight.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.aygfsteel.com/BearRui/comments/commentRss/319408.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/BearRui/services/trackbacks/319408.html</trackback:ping><description><![CDATA[     摘要: 上一文章中说到?如何减少h敎ͼq次说说如何减少h、响应的数据?卛_|络中传输的数据?Q减传输的数据量不仅仅可以加快面加蝲速度Q更可以节约服务器带宽,Z剩不钱?<br> GZIP压羃 <br> 别ؕ用cookie <br> 妙用204状?nbsp; <a href='http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance_reduce_weight.html'>阅读全文</a><img src ="http://www.aygfsteel.com/BearRui/aggbug/319408.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/BearRui/" target="_blank">BearRui(AK-47)</a> 2010-04-26 19:53 <a href="http://www.aygfsteel.com/BearRui/archive/2010/04/26/web_performance_reduce_weight.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>高性能WEB开?- Z么要减少h敎ͼ如何减少h?http://www.aygfsteel.com/BearRui/archive/2010/04/18/reduce_number_of_request.htmlBearRui(AK-47)BearRui(AK-47)Sun, 18 Apr 2010 10:58:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/04/18/reduce_number_of_request.htmlhttp://www.aygfsteel.com/BearRui/comments/318677.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/04/18/reduce_number_of_request.html#Feedback10http://www.aygfsteel.com/BearRui/comments/commentRss/318677.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/318677.htmlhttpq接开销
如何减少h?
1. 合ƈ文g
2. 合ƈ囄
3. 把JS、CSS合ƈ?个文?
4. 使用Image maps
5. data嵌入囄  阅读全文

BearRui(AK-47) 2010-04-18 18:58 发表评论
]]>
高性能web开?- 如何加蝲JSQJS应该攑֜什么位|?http://www.aygfsteel.com/BearRui/archive/2010/04/08/web_performance_js_where.htmlBearRui(AK-47)BearRui(AK-47)Thu, 08 Apr 2010 08:08:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/04/08/web_performance_js_where.htmlhttp://www.aygfsteel.com/BearRui/comments/317724.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/04/08/web_performance_js_where.html#Feedback32http://www.aygfsteel.com/BearRui/comments/commentRss/317724.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/317724.html
外部js文g应该攑֜什么位|?br />
嵌入JS的阻塞下?br />
嵌入JSDCSSd加蝲的问?br />
嵌入JS应该攑֜什么位|?nbsp; 阅读全文

BearRui(AK-47) 2010-04-08 16:08 发表评论
]]>
高性能WEB开?- 囄?/title><link>http://www.aygfsteel.com/BearRui/archive/2010/02/22/web_performance_image.html</link><dc:creator>BearRui(AK-47)</dc:creator><author>BearRui(AK-47)</author><pubDate>Mon, 22 Feb 2010 08:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/BearRui/archive/2010/02/22/web_performance_image.html</guid><wfw:comment>http://www.aygfsteel.com/BearRui/comments/313644.html</wfw:comment><comments>http://www.aygfsteel.com/BearRui/archive/2010/02/22/web_performance_image.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.aygfsteel.com/BearRui/comments/commentRss/313644.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/BearRui/services/trackbacks/313644.html</trackback:ping><description><![CDATA[     摘要: 1、羃图片大?<br>2、合q图片和拆分囄 <br>3、透明囄处理 <br>4、多域名下蝲囄 <br>5、IE6下缓存背景图?<br>6、预加蝲囄  <a href='http://www.aygfsteel.com/BearRui/archive/2010/02/22/web_performance_image.html'>阅读全文</a><img src ="http://www.aygfsteel.com/BearRui/aggbug/313644.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/BearRui/" target="_blank">BearRui(AK-47)</a> 2010-02-22 16:53 <a href="http://www.aygfsteel.com/BearRui/archive/2010/02/22/web_performance_image.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>高性能WEB开?- HTTP服务器篇http://www.aygfsteel.com/BearRui/archive/2010/01/29/web_performance_server.htmlBearRui(AK-47)BearRui(AK-47)Fri, 29 Jan 2010 07:42:00 GMThttp://www.aygfsteel.com/BearRui/archive/2010/01/29/web_performance_server.htmlhttp://www.aygfsteel.com/BearRui/comments/311230.htmlhttp://www.aygfsteel.com/BearRui/archive/2010/01/29/web_performance_server.html#Feedback5http://www.aygfsteel.com/BearRui/comments/commentRss/311230.htmlhttp://www.aygfsteel.com/BearRui/services/trackbacks/311230.html
C品ؓ了效果,做的比较炫,用了很多的图片和JSQ所以前端的性能是很大的问题Q分记录前端性能优化的一些小l验?


W一:HTTP服务?/span>


    因tomcat处理静态资源的速度比较慢,所以首先想到的是把所有静态资?JS,CSS,image,swf)


提到单独的服务器Q用更加快速的HTTP服务器,q里选择了nginx了,nginx相比apacheQ更加轻量Q?/p>


配置更加单,而且nginx不仅仅是高性能的HTTP服务器,q是高性能的反向代理服务器?/p>


    目前很多大型|站都用了nginx,新浪、网易、QQ{都使用了nginxQ说明nginx的稳定性和性能q是非常不错的?/p>


 1. nginx 安装(linux)


    http://nginx.org/en/download.html 下蝲最新稳定版?/p>


    Ҏ自己需要的功能先下载对应模板,q里下蝲了下面几个模块:

    openssl-0.9.8lQzlib-1.2.3Qpcre-8.00


    ~译安装nginx:

./configure 

--without-http_rewrite_module 

--with-http_ssl_module 

--with-openssl=../../lib/openssl-0.9.8l 

--with-zlib=../../lib/zlib-1.2.3 

--with-pcre=../../lib/pcre-8.00

--prefix=/usr/local/nginx


make


make install  


  2、nginx处理静态资源的配置


     #启动GZIP压羃CSS和JS

     gzip  on;

     # 压羃U别 1-9,默认?Q别越高压~率大Q当然压~时间也p?/p>

     gzip_comp_level 4;         

     # 压羃cd

     gzip_types text/css application/x-javascript;


     # 定义静态资源访问的服务Q对应的域名:res.abc.com

     server {

        listen       80;

        server_name  res.abc.com;


# 开启服务器d文g的缓存,

open_file_cache max=200 inactive=2h;

open_file_cache_valid 3h;

open_file_cache_errors off;


        charset utf-8;


     # 判断如果是图片或swfQ客L~存5?/p>

location ~* ^.+.(ico|gif|bmp|jpg|jpeg|png|swf)$ {

   root   /usr/local/resource/;

   access_log off;

   index  index.html index.htm;

   expires 5d;

        }


# 因JS,CSS改动比较频繁Q客L~存8时

location ~* ^.+.(js|css)$ {

   root   /usr/local/resource/;

   access_log off;

   index  index.html index.htm;

   expires 8h;

        }


# 其他静态资?/p>

location / {

   root   /usr/local/resource;

   access_log off;

   expires 8h;

}

    }


    3、nginx 反向代理讄


    # 反向代理服务Q绑定域名www.abc.com

    server {

listen       80;

server_name  www.abc.com;


charset utf-8;


# BBS使用Discuz! 

# 因反向代理ؓ了提高性能Q一部分http头部信息不会转发l后台的服务器,

# 使用proxy_pass_header ?proxy_set_header 把有需要的http头部信息转发l后台服务器

location ^~ /bbs/ {

   root   html;

   access_log off;

   index index.php;

   # 转发host的信息,如果不设|host,在后C用request.getServerName()取到的域名不是www.abc.comQ而是127.0.0.1

   proxy_set_header Host $host;

   # 因Discuz! Z安全Q需要获取客LUser-Agent来判断每ơPOST数据是否跟第一ơ请求来自同1个浏览器Q?/p>

   # 如果不{发User-Agent,Discuz! 提交数据׃?您的h来\不正,无法提交"的错?/p>

   proxy_pass_header User-Agent;

   proxy_pass http://127.0.0.1:8081;

}


# 其他h转发ltomcat

location / {

   root   html;

   access_log off;

   index index.jsp;

   proxy_pass http://127.0.0.1:8080;

}


error_page   500 502 503 504  /50x.html;

        location = /50x.html {

            root   html;

        }

    }


nginx详细配置参考:http://wiki.nginx.org/

PSQ如果安装提CGCC not foundQ运行下面命令安装就可以(apt-get install build-essential)Q仅限debian




BearRui(AK-47) 2010-01-29 15:42 发表评论
]]>
վ֩ģ壺 ɽ| ƽ½| | ¡| Ǩ| | | Ͻ| Զ| ͼ| ӽ| | | Ҵ| ̨| | | | ¡| ɽ| | ˮ| | | | ຣʡ| | ɽ| ɽ| ˫Ѽɽ| Ҿ| | ̨ǰ| | | | | ̨| ƽ| | |