[教程]3.6.5版本移除PJAX异步加载功能,以降低论坛加载速度
By
lincanbin
at 2015-10-12 • 0人收藏 • 2791人看过
//Pjax
$(document).pjax('a', '#main', {
fragment: '#main',
timeout: 10000,
maxCacheLength: 0
});
$(document).on('pjax:send',
function() {
$('#progressBar').show();
$("#progressBar1").css('width', 0);
$('#progressBar1').animate({
width: "100%"
},
800, "linear");
});
$(document).on('pjax:complete',
function() {
$('#progressBar').hide();
SetButtonToTop();
});有人觉得论坛太快了,会显得其他子站非常慢,想降低一下加载速度。
或者不会写异步代码,那么最简单的就是在global.js中移除这段,以禁止异步加载。
当然如果是后者,我建议花几十分钟去学习一下异步JavaScript的编写。
登录后方可回帖

粤公网安备 44030602003677号