How to clear the cache of LinkedIn sharer manually

前端 未结 7 1216
挽巷
挽巷 2021-01-17 13:59

At using share function via LinkedIn API, one and the same picture is transfered for each page of the website http://hrm.mysitedemo.co.uk
The picture is cached on the s

相关标签:
7条回答
  • 2021-01-17 14:28

    LinkedIn provides Post Inspector which obviously clears the preview cache.

    Just debug your cached url in https://www.linkedin.com/post-inspector/inspect/.

    It worked for me.

    0 讨论(0)
  • 2021-01-17 14:35

    Go to https://www.linkedin.com/post-inspector/ Insert URL of your page and click "Inspect". That's all)

    0 讨论(0)
  • 2021-01-17 14:36

    I've just found a way to force linkedin to fetch a fresh version of the page. Just create a redirect to your destination page and share the redirect page.

    For example:

    If your page that you want to share is: http://hrm.mysitedemo.co.uk

    Create a redirect for a page: http://hrm.mysitedemo.co.uk/share-li to go to http://hrm.mysitedemo.co.uk

    And then share the http://hrm.mysitedemo.co.uk/share-li on linked in. This way linkedin will think it's a new page and it'll get a fresh page version.

    It's easy to do if you're using wordpress, just install a redirection plugin like this one for example: https://wordpress.org/plugins/redirection/

    0 讨论(0)
  • 2021-01-17 14:39

    Content shared via LinkedIn is cached by LinkedIn's servers for a period of ~7 days. There is presently no way to manually clear the cache other than waiting for it to expire.

    One possible short-term work-around is to modify your URL with a "garbage" parameter at the end of it, e.g. http://example.com/mypage.html?donothing=1

    Provided your site does not change the content displayed based on the parameter you append, LinkedIn will see that as a different URL and you won't get the old cached version.

    0 讨论(0)
  • 2021-01-17 14:42

    Try passing the &summary="Your short description" in the url, as BBC does:

    https://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.bbc.com%2Fnews%2Fworld-europe-35602288&title=Ankara%20blast%3A%20Turkey%20PM%20says%20Syria%20Kurds%20to%20blame&summary=Turkey%27s%20prime%20minister%20says%20the%20deadly%20bombing%20in%20Ankara%20was%20carried%20out%20by%20Kurdish%20YPG%20militia%20based%20in%20Syria%2C%20and%20nine%20people%20have%20been%20arrested.&source=BBC

    This way it wont look to load it from your page's OG tags and it wont get cached. Worked for me

    0 讨论(0)
  • 2021-01-17 14:45

    In my case, the link didn't refetch because I had a RewriteRule (to force www) with [L,R=301] in .htaccess. Changing it to simply [L,R] made the preview change.

    0 讨论(0)
提交回复
热议问题