开发者

How to clear Linkedin Share cache?

I have a开发者_Python百科 new description in the page but when I share the page it is still using the old description that no longer exists, I am after something similar like the Facebook Lint.

Any ideas?


You can append dummy query string value to your url and make it look like a new url and LinkedIn fetches it again. I've tried it and it works.

For example:

https://www.codeproof.com/?refid=LinkedIn

where refid=LinkedIn is just a dummy value.

If your url already contains query string and then just append "&refid=LinkedIn" at the end of the url.


Unfortunately, appending a query string to the URL no longer works.

From the following StackOverflow post:

LinkedIn's content cache presently stores website information for approximately 7 days before the crawler will revisit the site.

There looks like there is no instant way to clear the cache, but to wait seven days, remove the media and re-add it.


Appending a query string to the URL no longer works, so you'll have to wait 7 days. But if you really need to share your URL with the medias you want, you'll have to go with a custom API call.

From the LinkedIn developer docs :

The first time that LinkedIn's crawlers visit a webpage when asked to share content via a URL, the data it finds (Open Graph values or our own analysis) will be cached for a period of approximately 7 days.

This means that if you subsequently change the article's description, upload a new image, fix a typo in the title, etc., you will not see the change represented during any subsequent attempts to share the page until the cache has expired and the crawler is forced to revisit the page to retrieve fresh content.

If you make API calls that directly provide the content to be shared rather than by a URL that requires analysis, LinkedIn will always use the values you provide.


Step 1: Visit https://www.linkedin.com/post-inspector/

Step 2: Enter your URL and click on Inspect, You will see the updated preview image

Step 3: Now try sharing your URL on LinkedIn


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://stackoverflow.com

Create a redirect for a page: https://stackoverflow.com/share-li to go to http://stackoverflow.com

And then share the https://stackoverflow.com/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/


For wordpress these steps work for me:

  1. In the home page I've removed the featured image and add it as a simple image on the header of the page
  2. I've created a redirect page in my blog like (mydomain.com/social) that redirects all requests to my blog (mydomain.com)
  3. Share the blog again in the social networks and everything will be ok

It's done =D


Unfortunately, there is none as of now. We are investigating what it would take to expose a similar feature. Please stay tuned. We'll announce it on the developer site at http://developer.linkedin.com.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜