通过审查元素发现,拖慢后台加载速度的主要是两个路径

1.https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js

2.http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/smoothness/jquery-ui.css

都是谷歌的,现在国内访问谷歌几乎是访问不了,必须要翻墙才可以,下面是解决这两东西的办法

第一种:

  通过wordpress后台安装 ‘Disable Google Fonts’ 这个插件,这是最简单的解决办法,网上大多都是用的这个,不过我测试了一下,没有效果,没起效果的接着往下看!

第二种:

  1.首先解决prototype.js,找到wp-includes下面的script-loader.php,查找字符串 ‘prototype’

$scripts->add( 'prototype', 'http://cdn.bootcss.com/prototype/1.7.3/prototype.min.js', array(), '1.7.3');

我们换成bootstrap的cdn加速代码

  2.解决jquery-ui.css,找到wp-includes下面的functions.php文件,在最下面添加如下代码,思路就是替换

function hc_cdn_callback($buffer) {
return str_replace('ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/smoothness/jquery-ui.css', 'cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.css', $buffer);//主要是修改这行
}
function hc_buffer_start() {
ob_start("hc_cdn_callback");
}
function izt_buffer_end() {
ob_end_flush();
}
add_action('init', 'hc_buffer_start');
add_action('shutdown', 'hc_buffer_end');

查看你的具体字符串格式,可能需要进行修改一点内容!

有更好的方法还请分享一下,如有错误还请指出,谢谢!

最新文章

  1. 发测试 HTML/FILE/MYSQL/动态 20151120
  2. centos7删除已经安装的docker
  3. Asp.net设计模式笔记之二:应用程序分离与关注点分离
  4. HttpContext.Current.Cache在控制台下不工作
  5. BZOJ3928 [Cerc2014] Outer space invaders
  6. python解无忧公主数学题108
  7. BZOJ 1641: [Usaco2007 Nov]Cow Hurdles 奶牛跨栏
  8. CodeForces - 269C Flawed Flow
  9. ACM2055_ctype.h_cctype
  10. windows下Eclipse安装Perl插件教程
  11. 了解一下Http常见状态码、Http协议的工作特点和原理、Http请求Post与Get的区别
  12. 英文谚语:Take that with a grain of salt
  13. windows 下配置 Nginx 常见问题
  14. Ubuntu通过 lshw 工具包查看物理网卡名称
  15. hdu3191+hdu1688(求最短路和次短路条数,模板)
  16. 基于Linux的Samba开源共享解决方案测试(六)
  17. [转帖学习] 使用阿里云证书 升级https
  18. 01Jenkins环境准备
  19. [LuoguP1363]幻想迷宫
  20. Prometheus exporter的Node exporter是可以独立安装,用来测试的

热门文章

  1. 把angular项目整合到.net mvc中
  2. java利用反射获取类的属性及类型
  3. JAVA IO流结构图
  4. 既然函数也是对象,那么为什么this不指向普通函数?
  5. [leetcode-495-Teemo Attacking]
  6. SQL联表查询
  7. JavaScript学习笔记(三)——留言板知操纵DOM节点
  8. Python对象类型及其运算
  9. 004.Create a web app with ASP.NET Core MVC using Visual Studio on Windows --【在 windows上用VS创建mvc web app】
  10. dict-字典功能介绍