2017-07-07 123 views
1

我有上的Drupal的smartsupp聊天的一個問題,聊天Smartsupp,Drupal的腳本

這是代碼調用,我插入到PHP頁面聊天框,但問題是,它需要很長的時間加載。如何優化腳本以便加載速度很快。

<!-- Smartsupp Live Chat script --> 
<script src="js/loader.js"></script> 
<script type="text/javascript"> 
var _smartsupp = _smartsupp || {}; 
_smartsupp.key = '425fb33bf5e0cf0b359b9e60a17d16a78fd5efa3'; 
window.smartsupp||(function(d) { 
    var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[]; 
    s=d.getElementsByTagName('script')[0];c=d.createElement('script'); 
    c.type='text/javascript';c.charset='utf-8';c.async=true; 
    c.src='//www.smartsuppchat.com/loader.js';s.parentNode.insertBefore(c,s); 
})(document); 
</script> 
+0

第一個腳本標籤是否也加載了smartsupp加載程序? –

+0

是的,但也可以這樣試試「www。**。com/loader.js」 –

回答

1

這是來自Smartsupp的Vladimir。

您是否在Smartsupp內部使用訪客錄製?此功能具有最大的負載。如果加載時間是您主要關注的問題,則可以關閉訪客錄製(訪客錄製選項卡中的齒輪圖標)。

Smartsupp聊天腳本大小爲112 KB:有關Smartsupp腳本加載時間信息的

點點。加載時所有Smartsupp元素的大小爲450 KB,需要230 ms才能加載寬帶Internet連接。該腳本是異步的,因此它不會減慢網站的加載速度。你可以在這裏看到腳本加載細節:

https://www.dropbox.com/s/0vy54qnuko7884n/_Smartsupp%20script%20load%20time.png?dl=0

如果您還有其他問題,您可以在[email protected]與我們聯繫。