Beantin webbkommunikation

Beantin Beta Blog

Experiments, investigations, and tests of web things
January 15, 2013

Clearing LinkedIn’s link sharing preview cache

When sharing a link on LinkedIn a preview is generated. This preview uses data from your webpage (Open Graph metadata if present). Sometimes you want to optimise this text, so you test the page first.

linkedin-sharing-preview-520x94

Unfortunately LinkedIn caches the data it retrieves the first time the link is previewed and keeps it cached for a week!

LinkedIn achknowledged this limitation almost two years ago but there still isn’t any tool available to clear the preview cache.

Facebook

Facebook cache preview data too, but with Facebook it’s possible to reset the data by putting your URL through the debugger (formally “Lint”).

Google+

Google+ naturally caches everything too, but Google+ honour the caching directives of your page and resources – as they should.

So when testing with G+ you should if possible make sure you’ve set short cache lifetimes on your webpage and images.

LinkedIn

The only way to “clear” the sharing preview cache for LinkedIn is to trick LinkedIn into thinking your page is a different (and new) page.

This is done by adding a made-up parameter to the link. It doesn’t affect your webpage, but it does force the metadata to be re-fetched.

Example:

Original link: http://beantin.se/consultant-resume
"New" link: http://beantin.se/consultant-resume?1
Related Posts Plugin for WordPress, Blogger...
  • Web Analytics World

    Interestingly the new URL workaround for LinkedIn didn’t work for me but no matter as I then realised that you can now just click on the link preview and it lets you edit it! PeterK

    • Remember that you’re only editing /your/ sharing preview. If others share your preview it’ll still be “wrong”. Best to fix site-side to improve sharing.

      • Agreed, but how? If a URL from my site is manually shared the image and title get pulled, but if a sharing button is used it just says growmap.com – no image, no title – but it does link to the post. I’ve updated Genesis, changed social sharing plugins, changed child themes. Still broken. Suggestions?

  • Aurel Pop

    “So when testing with G+ you should if possible make sure you’ve set short cache lifetimes on your webpage and images.” How can I do that? For testing I’ve set meta property og:title with a test content, and Google+ cached it, and now every time pushes the G+ button, it appears the test content, even thou I’ve changed it.

    • how to set caching directives varies according to your web hosting provider. If you’re running on an apache server, then you can add directives to control the caching of resources, making use of modules such as mod_headers and mod_expires.

  • mullala

    Isn’t the changed link for LinkedIn then tracked differently in website analytics, thus messing up with your reports and SEO?

    • If you site and analytics are correctly configured, then no, it won’t affect things – but remember, the key point here is to *test* the preview of your page using a made up parameter. You do this so you avoid using your /real/ link when testing (and causing the preview to be cached). You never actually post it!

  • Tony

    It isn’t working at all for me. http://www.mysite.com/mypage and http://www.mysite.com/mypage?x=1 produce the same result. Doesn’t matter what I change the ‘x’ parameter to.

  • Troy

    Absolute life-saver, thank you!

  • Great advice, James! Thanks!

  • Benoit Ter Burg

    Great ! It works after spending hours night and day to keep a workaround for Office 365 which does not accept og (open graph) meta data … :-( … Many many thanks :-)

  • Danielle Marie

    If the Linked In workaround suggested above doesn’t work for you (it didn’t for me) then I suggest using the long form. I have blogged about it here http://www.wix.com/support/html5/ugc/e828aa26-d50b-4e5a-a982-ff563ca7e3dd/061f3e24-55e1-418d-ab65-9d6b0457b863

  • Miloš Milosavljević

    Nice tips. For LinkedIn, I’d just suggest replacing the original url with one created using Google URL builder. You can then use the new URL to segment traffic in analytics, and you get the proper snippet in one blow

  • Mukesh Choudhary

    Hi!
    i have having a problem while sharing my job posting on LinkedIn, i uploaded my images on my job posting but at the time when i share my job posting on LinkedIn, the different image come with my job posting
    so why is that so please help me out

  • George Botsaris
  • Dominique Deyran

    And… It does work! Thanks :)

  • Ajdin Masic

    I realize that this is an old blog post but thank you for sharing this! It has helped my company and I out a lot! Great read! Clear and concise!

  • Alexandra Cordes

    Thank you!

  • Thank you so much. This works perfectly on LinkedIn! :-) As a matter of fact, you can change the URL back to its original structure after the preview has loaded.

  • Jason Marlowe

    This was a life-saver! Searched for hours before finding this solution for LinkedIn. I thought I was losing my mind. Especially because I was using the Social Debug tool from socialdebug.com – Thanks again!

  • I’m having this problem on Twitter too… any insights? Been looking around on Google for answers… can’t find any #sadpanda

  • Catie Holdridge

    You are my hero! This saved my sanity trying to share on LinkedIn. Thank you so much.

  • Lalena Kennedy

    Thank you, this just worked for me on LinkedIn!

  • Ian

    Awesome – LinkedIn instructions worked like a charm. I had been tearing my hair out wanting to post an update tomorrow having spent a couple hours updating my website, flushing caches, you name it!

    Thank you.

  • adamhonig

    Thank you. That’s really helpful

  • Zak Djmentos Young

    THANK YOU!!!! :)

  • Sergei Golubev

    Thanks so much for the tip, very helpful!

  • want to some fun with Dandelion world of botany..
    Download link: https://play.google.com/store/apps/details?id=com.aaryavarta.dandelion&hl=en

  • it works perfect!

  • vir2ul1

    Thanks for this. Was driving me nuts. It worked!

  • Lily

    Didn’t work for me any suggestions

  • This doesn’t work for me at all.

  • Poet

    Genius! Brilliant! Thank you!

Theme Beantin created by James Royal-Lawson. Privacy Policy