Using Google +1 without JavaScript

I would like to add the Google +1 badge to the site, but without using JavaScript. Is it possible? Is there any url that I can just link to make it work?

+8
google-plus-one
source share
4 answers

Google now supports sharing via a static URL:

https://plus.google.com/share?url=URLHERE 

Additional information: https://developers.google.com/+/plugins/share/#sharelink

+10
source share

There is a feature request that you can comment on to show your support: https://code.google.com/p/google-plus-platform/issues/detail?id=50

Meanwhile, since there’s no backup of the +1 button when javascript is disabled, Google believes that tracking users is more important than the inability of people to share information through their service.

Either use Edy Freddy's good hack to ease privacy concerns, or take your cue from backup +1 to zero when javascript is disabled. Skip the Google+ implementation until they implement it. -Steve

+4
source share

I do not think so. The part provided by Google is some JavaScript. Perhaps you can parse JavaScript and extract something like links from it, but they won’t be advertised because they’ll lose the ability to track website users using the +1 buttons. Another reason that there can be no solution without JavaScript is that special features associated with the Google user login session will be lost.

But I have a good solution for you that I found a few days ago on the Internet. This helps your site’s visitors stay confidential and not be tracked by Google in an undesirable way when you put the +1 button on your site.

Put the button of your choice in your own domain and implement this alternative JavaScript. It only downloads JavaScript from Google when users click the +1 button.

Implement secure data protection on Google +1

 <script type="text/javascript"> function loadScript(jssource) { var jsnode = document.createElement('script'); jsnode.setAttribute('type','text/javascript'); jsnode.setAttribute('src',jssource); document.getElementsByTagName('head')[0].appendChild(jsnode); document.getElementById('plus1').innerHTML = ""; } var plus1source = "https://apis.google.com/js/plusone.js"; </script> <a id="plus1" href="javascript:loadScript(plus1source)"> <img width="76" height="24" title="Show Google +1 Button" alt="Show Google +1 Button" src="http://www.yourwebsite.tld/showplusone-2.jpg"> </a> <g:plusone></g:plusone> 
+2
source share

Eddie Freddy's answer is an elegant trick, but it does not address the question asked.

In some places, you simply cannot have JavaScript, no matter how you try! The same goes for iFrames and CSS in some cases. “Where did this happen?” You may ask; The easy answer: email clients.

It works to create a simple static link for posting on Twitter. Before he sends a tweet, you are taken to a page where you are given the opportunity to first edit and approve the message as a registered user, so we are looking for the Google +1 equivalent of this function.

It would be unwise to implement this on your own. Add a static +1 link to your own creation page, which is in an environment where you can run JS, etc., And thus, the user can be a registered Google user at that time, after which a second click can confirm the message. However, this approach really only applies to email clients - if you are blocked for other reasons (for example, some kind of security policy that prohibits JS everywhere), you are still full.

Almost the same thing applies to Facebook Like buttons, as they behave the same and impose the same requirements. Twitter seems to be the only site that has thought about this and provides an official mechanism without JS.

There is no way to get around the requirement with two clicks, since without it someone would be able to publish it as someone else, which would be stupid.

+1
source share

All Articles