Social Share and Like buttons without Javascript 4/10/15

By Chris Johnson

Update 2/12/2019: Facebook has updated their sharing URL, and Google plus is no more.

Social networks like Twitter and Facebook encourage you to drop external Javascript code on your website if you want those little share and like buttons you see everywhere. However, relying on external Javascript has a few downsides. For instance, you are:

Instead, you can use custom sharing links that don’t run any outside Javascript. If you go this route, you also get the benefit of being able to easily use custom text or button designs.

In each of the following examples, you’ll need to replace the YOUR-_____ in the HREFs with your own URL encoded content. If your pages are generated by server-side code, your programming language should have a URL encoding function that can help. Otherwise, there are online URL encoding tools you can use.


<a href="">Twitter</a>


<a href="">Facebook</a>


<a href="">LinkedIn</a>


<a href="">Pinterest</a>

I compiled this list with the help of a couple StackOverflow answers and Scott Hanselman’s post on the same subject.

  1. The Javascript will not only require more time to download, but it will use some of your visitor’s computing power to run. On desktop computers that might not be a big deal, but it could seriously slow mobile devices.