---
title: "google +1加载慢解决办法"
author: "chinacode"
date: "2011-07-14T23:04:39Z"
tags: []
categories: ["Web前端"]
slug: "google-1"
draft: false
lastmod: "2011-07-14T23:04:39Z"
id: 1124772
url: "https://chinacode.iteye.com/blog/1124772"
---

使用google+1一段时间了，发现不是很稳定，一段时间能用一段时间不能用，在国内加载速度有时间奇慢，和gmail一样。  
期待改善。

#### google +1介绍：

Google +1 is yet another attempt to make Google more social. It’s Google’s version of the Facebook “likes”, a simple feature that’s very powerful because it’s part of a social network.

既然想使用它，就得想办法改善它，不让他影响网页的加载。

本人的做法是 – 采用异步加载:

将要加载的内容放在网页&lt;/body&gt;结束符之前位置，来保证网页顺利加载。

采用js加载js的办法进行js加载，就不会影响网页的加载了。

[View Code](http://www.blags.org/google-plusone-slow-loading-solution/) JS

```
document.write('<script type="text/javascript" src="https://apis.google.com/js/plusone.js"><\/script>');
```

在需要的地方加上g:plusone标签：

[View Code](http://www.blags.org/google-plusone-slow-loading-solution/) HTML

```
<g:plusone count="false" href="http://www.blags.org"></g:plusone>
```

获取地址:

[http://www.google.com/intl/zh-CN/+1/button/index.html](http://www.google.com/intl/zh-CN/+1/button/index.html "google+1")  
[http://www.google.com/intl/zh-CN/webmasters/+1/button/index.html](http://www.google.com/intl/zh-CN/webmasters/+1/button/index.html "google+1代码获取")

 

[![Google+1](http://www.blags.org/wp-content/Upload/Google-+1-300x155.gif "Google+1")](http://www.blags.org/wp-content/Upload/Google-+1.gif)

Google+1

**出处:** [马丁博客](http://www.blags.org/)［[http://www.blags.org/](http://www.blags.org/)］

**本文链接地址:** [http://www.blags.org/google-plusone-slow-loading-solution/](http://www.blags.org/google-plusone-slow-loading-solution/)