Jump to content


Photo

Extjs & Unigui CDN

CDN customfiles

  • Please log in to reply
17 replies to this topic

#1 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 03 July 2014 - 02:57 AM

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.googleap...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.c...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网站加速-常见问题解答
 
引用CDN内容的方法总结

 

 

 

本地127.0.0.1发布UNIGUI服务,本地访问:127.0.0.1:8077
 
加载EXTjs语言文字JS
 
CDN 47毫秒
本地  159毫秒

 

 

例如:

谷歌:

<script type="text/javascript" src="http://ajax.googleap...1/jquery.min.js"></script>

微软:

<script type="text/javascript"src="http://ajax.aspnetcd...ry-1.9.1.min.js"></script>

新浪:

<script type="text/javascript" src="http://lib.sinaapp.c...0/jquery.min.js" ></script>


  • 0

#2 ganzqgy

ganzqgy

    Advanced Member

  • Members
  • PipPipPipPip
  • 143 posts

Posted 03 July 2014 - 09:40 AM

/ / 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.c...1/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery != 'undefined')
     {document.write(unescape("%3Cscript src='http://cdn.bootcss.c....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>


  • 0

#3 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10356 posts

Posted 04 July 2014 - 03:13 PM

In a Unigui app, browser also caches static js files so I see no advantage in placing them on a remote server.
  • 0

#4 ganzqgy

ganzqgy

    Advanced Member

  • Members
  • PipPipPipPip
  • 143 posts

Posted 04 July 2014 - 11:10 PM

Can greatly improve the first download speed, if after the browser cache, speed is the same.


  • 0

#5 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 02:10 AM

/ / 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.c...1/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery != 'undefined')
     {document.write(unescape("%3Cscript src='http://cdn.bootcss.c....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)


  • 0

#6 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 02:11 AM

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)


  • 0

#7 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 03:51 AM

UNIGUI + CDN

 


  • 0

#8 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 03:52 AM

unigui + not cdn 


  • 0

#9 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 03:58 AM

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 


  • 0

#10 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 04:19 AM

The client to obtain comparative time consumed by the ext-all.js resource file.

 

客户端 获得 ext-all.js 资源文件所耗费时间的对比。
 

Unigui url:  http://183.234.23.12.../ext-all.min.js

 

 

Test URL:

Http://www.17ce.com/site/http/201407_fe1c9b1e16706c0400251f05dc8f83cd-201407_59c447db1336ae66fc7a539fcfcaa0b6.html


  • 0

#11 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 04:34 AM

The client 400+

Send CDN packet 5MB

Standard UNIGUI packets 161MB

 

 

客户端 400+
 
CDN 发送 数据包 5MB
标准UNIGUI发送数据包 161MB

  • 0

#12 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 05 July 2014 - 04:35 AM

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获取
 
通过UNIGUI服务获取
测试网站
可以获得 不同ISP 不同省份访问你的服务平均响应速度

  • 0

#13 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10356 posts

Posted 05 July 2014 - 02:00 PM

Moved here for further inv.


  • 0

#14 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 20 March 2015 - 01:34 PM

+1


  • 0

#15 Soho Software Team

Soho Software Team

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 08 September 2015 - 06:37 AM

+1


  • 0

#16 Adan

Adan

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 154 posts
  • LocationAsunción, Paraguay

Posted 30 December 2017 - 11:11 PM

+1


  • 0

#17 irwan

irwan

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 71 posts

Posted 31 December 2017 - 04:44 PM

+1


  • 0

#18 steve589

steve589

    Member

  • uniGUI Subscriber
  • PipPip
  • 18 posts

Posted 28 January 2018 - 10:21 AM

+1


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users