Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I had to switch off Pinterest because the Javascript is spyware and is slowing down my sites.
The Pinterest Javascript is loaded from Pinterest.com instead of the module or a library. The Pinterest Javascript then logs every page request to log.pinterest.com. The Pinterest log request is the slowest http request in a page request on each site and, in some cases, doubles response time. The logging of page requests by a third party is also against the policies of most sites.
The activity would be acceptable on some of the sites if it was limited to the pages containing Pinterest buttons.
Comment | File | Size | Author |
---|---|---|---|
#9 | pinterest.zip | 2.21 KB | haleagar |
#1 | pinterest_bad_javascript.png | 457.92 KB | Jawi |
Comments
Comment #1
Jawi CreditAttribution: Jawi commentedThe Pinterest Javascript is slowing down our sites.
Is their a strait forward way to run the javascripts locally - and only on the pages with the button active?
Our pageload is over 23 seconds.
http://www.webpagetest.org/result/130923_KM_19e6f65699ea53540428d46ecc5c...
Al ideas are welcome :)
Comment #2
Simon Georges CreditAttribution: Simon Georges commentedI'm not sure you're permitted to not use the official pinterest javascript (licensing issues, things like that).
Can somebody eventually point me towards the right documentation, so I can better understand what is or is not possible?
I'm not a Pinterest user, so I'm willing to integrate a patch, but I won't develop it myself.
Comment #3
Simon Georges CreditAttribution: Simon Georges commentedComment #4
Simon Georges CreditAttribution: Simon Georges commentedComment #5
Jawi CreditAttribution: Jawi commentedFor now I'm using the Share this module from a best practice on my other sites. https://drupal.org/project/sharethis
This is working as it should.
When issues with the pinterest button are solved, I'll test the service links again.
Comment #6
mstrelan CreditAttribution: mstrelan commentedFrom https://developers.pinterest.com/pin_it/
Except I don't really see that helping, since pinit.js just calls pinit_main.js directly from the pinterest server too.
Comment #7
mstrelan CreditAttribution: mstrelan commentedAdditionally, you can load the Pinterest JS asynchronously.
It might be a bad idea to use
jQuery.getScript()
as that prevents the retrieved file from being cached in the browser.Comment #8
haleagar CreditAttribution: haleagar commentedWhat about a no JS link only version of Pintrest not the widget?
http://stackoverflow.com/questions/10690019/link-to-pin-it-on-pinterest-...
Comment #9
haleagar CreditAttribution: haleagar commentedOK so not quite as easy as I thought to add pinterest as simple link. The link needs an image.
But the widget services module shows exactly how to add a custom form to input a token for that and the description field, and use them in your service link.
I'm not using this, but I was just extending the twitter link to add a "via" option, and use an alternate token for description instead of teaser, so I whipped together a pinterest service module.
Not sure if it's worth submitting as a module to DO,
Nor do I see how to add this to http://servicelinks.altervista.org/
I believe it would be worthwhile to extend Service Links to allow you to set your token for Media and Description just as you can the title.
What says TheCrow?
Comment #10
GiorgosK#9 seems to work as expected
I wish there was a pinterest service together with the widget
but I guess in order to be integrated it needs work right ?