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>
第一个脚本标签是否也加载了smartsupp加载程序? –
是的,但也可以这样试试“www。**。com/loader.js” –