我在drupal上的smartsupp聊天有问题,
这是调用我插入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 :(得分:1)
这是来自Smartsupp的Vladimir。
你在Smartsupp内使用访客录音吗?此功能负载最大。如果您主要关注加载时间,则可以关闭访客录制(访客录制选项卡中的齿轮图标)。
有关Smartsupp脚本加载时间的一些信息:
Smartsupp聊天脚本大小为112 KB。加载时所有Smartsupp元素的大小为450 KB,加载宽带互联网连接需要230 ms。该脚本是异步的,因此它不会减慢网站的加载速度。您可以在此处查看脚本加载详细信息:
https://www.dropbox.com/s/0vy54qnuko7884n/_Smartsupp%20script%20load%20time.png?dl=0
如果您还有其他问题,可以通过support@smartsupp.com与我们联系。