ZhangLazarus Posted July 3, 2014 Posted July 3, 2014 1)about cdn Unigui is a WEB development framework excellent. UNIGUI development process is in the local area network loading speed, but the Internet load very slowly. I think the main reason is that ext-all.js is 1.4MB + ext-all-rtl.js 1.4mb, I see a lot of CDN resources on the internet. For example Google CDN and Microsoft CDN. I think can be UNIGUI JS resources in a CDN, or unigui official website. In the TUniServerModule to add a Boolean attribute the difference from the local loading or loaded from CDN JS. This can reduce UNIGUI server network bandwidth, and also can make full use of the browser cache mechanism to improve access speed. This is a free CDN contains all versions of EXTJS http://open.bootcss.com/extjs/ The local 127.0.0.1 publishing UNIGUI services, local access: 127.0.0.1:8077 Load the EXTjs language JS CDN 47 MS Local 159 milliseconds When loading a CDN is not successful, the local resource loading <!-- Adds google cdn reference --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script><!-- Cdn fail refers to local library --><script type="text/javascript">if (typeof jQuery == 'undefined') {document.write(unescape("%3Cscript src='js/jquery-2.0.0.min.js' type='text/javascript'%3E%3C/script%3E"));}</script> CDN Web accelerator - FAQ http://www.88ztc.com/a/507.html Summarize the methods to reference the CDN content http://www.cnblogs.com/rush/archive/2013/05/31/3111139.html 2)about customfiles About customfiles I think we should first load Unigui是优秀的WEB开发框架。 UNIGUI开发的程序在局域网加载速度还算可以,但是互联网加载很慢。 我认为主要是原因是ext-all.js 1.4mb + ext-all-rtl.js 1.4mb, 我看到网上有不少CDN资源。例如 谷歌 CDN 和 微软CDN。 我在想 能不能 将UNIGUI的JS资源也放到某个CDN上面,或者是unigui官方网站。 在TUniServerModule增加一个Boolean属性区别从本地加载JS还是从CDN上加载。 这样可以减轻UNIGUI服务器的网络带宽,并且也可以充分利用浏览器的缓存机制提高访问速度。 CDN网站加速-常见问题解答 http://www.88ztc.com/a/507.html 引用CDN内容的方法总结 http://www.cnblogs.com/rush/archive/2013/05/31/3111139.html 本地127.0.0.1发布UNIGUI服务,本地访问:127.0.0.1:8077 加载EXTjs语言文字JS CDN 47毫秒 本地 159毫秒 例如: 谷歌: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 微软: <script type="text/javascript"src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"></script> 新浪: <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js" ></script>
ganzqgy Posted July 3, 2014 Posted July 3, 2014 / / loading CDN files on JS, the original ext-all.js was renamed ext-all-1.js, and an empty ext-all.js serverModule custommeta: <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script><script type="text/javascript">if (typeof jQuery != 'undefined') {document.write(unescape("%3Cscript src='http://cdn.bootcss.com/extjs/4.2.1/ext-all.js'%3E%3C/script%3E")); }else {document.write(unescape("%3Cscript src='ext-4.2.1.883/ext-all-1.js'%3E%3C/script%3E")); }</script>
Administrators Farshad Mohajeri Posted July 4, 2014 Administrators Posted July 4, 2014 In a Unigui app, browser also caches static js files so I see no advantage in placing them on a remote server. 1
ganzqgy Posted July 4, 2014 Posted July 4, 2014 Can greatly improve the first download speed, if after the browser cache, speed is the same. 1
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 / / loading CDN files on JS, the original ext-all.js was renamed ext-all-1.js, and an empty ext-all.js serverModule custommeta: <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> if (typeof jQuery != 'undefined') {document.write(unescape("%3Cscript src='http://cdn.bootcss.com/extjs/4.2.1/ext-all.js'%3E%3C/script%3E")); } else {document.write(unescape("%3Cscript src='ext-4.2.1.883/ext-all-1.js'%3E%3C/script%3E")); } </script> If the UNIGUI server on the internet. Reference ext-all.js resources than in obtaining Ext-all.js from the UNIGUI server to improve the speed of 50%~60% through CDN server. And can reduce the UNIGUI server running on the Internet to network bandwidth (from the request and send the packet size comparison, about 70% reduction) This is my test results down a few days. So I think CDN is of great significance to the Internet release of UNIGUI server, can effectivelyimprove the user experience (because much faster)
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 In a Unigui app, browser also caches static js files so I see no advantage in placing them on a remote server. If the UNIGUI server on the internet. Reference ext-all.js resources than in obtaining Ext-all.js from the UNIGUI server to improve the speed of 50%~60% through CDN server. And can reduce the UNIGUI server running on the Internet to network bandwidth (from the request and send the packet size comparison, about 70% reduction) This is my test results down a few days. So I think CDN is of great significance to the Internet release of UNIGUI server, can effectivelyimprove the user experience (because much faster)
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 UNIGUI server description: The same PC server, 4MB cable access internet access 10077 port using CDN Technology The 10078 port of the unigui service standard Test method: 1) the browser cache. 2) to access the UNIGUI server URL UNIGUI服务器说明: 同一台PC服务器, 4MB 光缆 接入 接入互联网 10077端口 采用了 CDN技术 10078端口 标准的unigui服务 测试方法: 1)情况浏览器缓存。 2)访问UNIGUI服务器URL http://183.234.23.125:10077/ Unigui + CDN http://183.234.23.125:10078/ Unigui + NOT CDN 1
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 The client to obtain comparative time consumed by the ext-all.js resource file. 客户端 获得 ext-all.js 资源文件所耗费时间的对比。 CDN url: http://cdn.bootcss.com/extjs/4.2.1/ext-all.min.js Unigui url: http://183.234.23.125:10078/ext-4.2.1.883/ext-all.min.js Test URL: Http://www.17ce.com/site/http/201407_fe1c9b1e16706c0400251f05dc8f83cd-201407_59c447db1336ae66fc7a539fcfcaa0b6.html
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 The client 400+ Send CDN packet 5MB Standard UNIGUI packets 161MB 客户端 400+ CDN 发送 数据包 5MB 标准UNIGUI发送数据包 161MB
ZhangLazarus Posted July 5, 2014 Author Posted July 5, 2014 Unigui must be ext-all.js Through CDN Http://cdn.bootcss.com/extjs/4.2.1/ext-all.min.js Access through a UNIGUI service Http://183.234.23.125:10078/ext-4.2.1.883/ext-all.min.js The test site Http://www.17ce.com Can obtain different ISP from different provinces and access your average service responsespeed unigui必须的 ext-all.js 通过CDN获取 http://cdn.bootcss.com/extjs/4.2.1/ext-all.min.js 通过UNIGUI服务获取 http://183.234.23.125:10078/ext-4.2.1.883/ext-all.min.js 测试网站 http://www.17ce.com 可以获得 不同ISP 不同省份访问你的服务平均响应速度 1
Administrators Farshad Mohajeri Posted July 5, 2014 Administrators Posted July 5, 2014 Moved here for further inv.
Recommended Posts