One of the Guy from a website asked me to decrease the page load time of his website. Upon inspection of his website I found that the PrintFriendly button caused the website to load slowly because of its javascript.
What is Print Friendly ?
PrintFriendly is a easy to use website and a tool that can be implemented in the website by which the reader can save the web page in PDF format as well as Print the page or post of any blog in a clean way removing images and ad banners.
Here are following options available to add the button to your blog/website:
For WordPress users here is the plugin: PrintFriendly Plugin
Other Users can get the button from here: Print Friendly Button
But that Buttons would take some time to load due to its Javascript so here is the code without Javascript:
For WordPress Users:
- Go to your Dashboard.
- Click on Setting, then Click on Sharing.
- In Sharing tab, Click on Add New Service
- In Pop Up window give the name to the service as “Save As PDF“.
- In Sharing URL paste the below code:
1 |
http://www.printfriendly.com/print?url=%post_full_url% |
- In Icon URL paste the below code:
1 |
http://cdn.printfriendly.com/icon-print-friendly-16x16.png |
- The Click on Create Share.
- Then Drag and Drop it to ‘Enabled Services’.
For Blogger Users:
- Go to Template. Then Click on ‘Edit HTML’.
- Find ‘data:post.body’ [there may be 2-3 you would find, with trial and error you will find the true one]
- Now place the below code above the “data:post.body” for placing the button at the top of the posts and below the “data:post.body” for placing below the posts.
1 2 3 |
<b:if cond='data:blog.pageType != "index"'> <a expr:href='"http://www.printfriendly.com/print?url=" + data:blog.url'><img alt="pf-button-both" src="http://cdn.printfriendly.com/pf-button-both.gif" style="border:none;" title="pf-button-both"></a> </b:if> |
If you have some further question feel free to ask in comments 🙂
Hey Kaxil,
Thanks for the great article..
I was looking for this for quite a long time..
Cheers.. 🙂
Ur welcome…. Bro
This is really easy and effective trick. Nice plugin, thanks