当前位置:首页 > 电脑·技巧 > 正文

简单解决因为Google被墙而导致WP访问速度慢

最近,有网友反映称谷歌官网域名google.com、谷歌香港google.com.hk都打不开, ping了一下google.com和google.com.hk两个域名的服务器情况,最后ping出来的IP地址均显示为“美国”,也就是说谷歌香港(google.com.hk)的服务器,已由香港转移至美国,所以链接时间会很长,甚至断断续续出现请求超时的情况

20140605100351731

图:google.com.hk域名服务器ping测结果

 Google服务在大陆的崩溃情况不仅影响到了广大网民,也影响到了数百万的站长。WordPress是世界上最大的开源博客程序,而WordPress大部分的主题都在使用Google的在线字体方案——Google Fonts,Google服务一不稳定,大量的独立博客字体就加载不出来,直接导致了几十万独立博客打开速度令人无法忍受,严重的时候会导致网站打不开。

图:Google字体打开时间19秒

图:Google字体打开时间19秒

   为此,360网站卫士推出一项字体加速服务,站长只要修改一行代码,就可以免费使用到由360网站卫士CDN加速的字体服务。

 修改方法如下:

打开wordpress代码中的文件wp-includes/script-loader.php文件,搜索:fonts.googleapis.com找到这行代码:

$open_sans_font_url = “//fonts.googleapis.com/css?family1=Open+Sans:300italic,400italic,600italic,300,400,600⊂=$subsets”;

把fonts.googleapis.com替换为fonts.useso.com

把fonts.googleapis.com替换为fonts.useso.com

   修改完保存,再次刷新,大家就可以发现,自己的网站速度已经比以前快了很多,几乎瞬间就可以拿到Google字体了。原因就是本来需要从美国服务器才能拿到的google字体,现在已经遍布360全国的机房了。

20140605100351261

标签:
上一篇: 下一篇:

470 条评论

评论加载中...
  1. 390楼
    来自天朝的朋友 谷歌浏览器 Windows 7
    mester  

    I’m curious to find out what blog platform you’re
    utilizing? I’m having some small security problems with my latest site and
    I’d like to find something more safe. Do you have any suggestions?

    2018年8月10日 04:08 评论
  2. If you are going for most excellent contents like me, simply pay a visit this site all the time because it offers feature contents,
    thanks

    2018年8月10日 04:04 评论
  3. Hello everybody, here every one is sharing such experience,
    so it’s nice to read this blog, and I used to visit this webpage everyday.

    2018年8月10日 02:57 评论
  4. o che non sia peggio di quanto pensiamo. ‘Quando i funerali furono terminati e gli ospiti seri si erano allontanati, Trafford si chiuse in biblioteca e rimase lì da solo fino a notte fonda. C’era una gran quantità di carte sul tavolo davanti a lui, perché con il suo ducato le sue nuove responsabilità erano cominciate e chiedevano a gran voce attenzione, ma non ne guardò nessuna. Non poteva nemmeno [255] pensare a suo padre morto. Esmeralda, Esmeralda – era tutta Esmeralda! Al mattino Lilias si avvicinò a lui con gli anelli rossi intorno agli occhi: ‘Credi che potrei andare a Esmeralda,

    2018年8月10日 02:00 评论
  5. What’s Taking place i am new to this, I stumbled upon this
    I’ve found It absolutely useful and it has helped me out loads.
    I am hoping to contribute & assist other users like its helped me.

    Good job.

    2018年8月9日 23:03 评论
  6. Hey! This is my 1st comment here so I just wanted to give a
    quick shout out and say I really enjoy reading your
    blog posts. Can you suggest any other blogs/websites/forums that deal with
    the same topics? Many thanks!

    2018年8月9日 21:33 评论
  7. 384楼
    这家伙可能用了美佬的代理 谷歌浏览器 Mac OS X 10_11_6
    erotikkaufen  

    It’s going to be end of mine day, however before end I am reading this
    enormous article to increase my knowledge.

    2018年8月9日 19:11 评论
  8. Hi terrific blog! Does running a blog similar to this take a lot of work?
    I’ve no understanding of computer programming but I was hoping to start my own blog
    soon. Anyways, should you have any suggestions or techniques for new blog owners
    please share. I understand this is off topic nevertheless I simply wanted to ask.
    Thank you!

    2018年8月9日 18:22 评论
  9. 382楼
    这家伙可能用了美佬的代理 火狐浏览器5.0 Windows 7
    pantoletten  

    Right now it looks like BlogEngine is the top blogging
    platform available right now. (from what I’ve read) Is
    that what you’re using on your blog?

    2018年8月9日 15:44 评论
  10. 381楼
    这家伙可能用了美佬的代理 谷歌浏览器 Windows 10
    kleider günstig  

    Hi there, just wanted to mention, I loved this blog post. It
    was funny. Keep on posting!

    2018年8月9日 14:37 评论

发表评论

不理你。不要啊!吃饭。吃惊。吃西瓜。飞吻!恭喜!Hi纠结!膜拜!OK抛媚眼。泡泡糖。抛钱。忍!生闷气!调皮。偷看。委屈。献花。疑问?抓狂!

小提示:Ctrl+Enter快速提交助您一臂之力~
加载中……