Clear cached Facebook share content.

3

A quick how-to expire cached Facebook share content, on demand.

on 14/11/10

I recently updated some description text on a page that contained Facebook share functionality, but Facebook wasn't displaying the text I had just updated. Why? Caching.

As you can imagine, a website the size of Facebook needs to have some scaling qualities and caching is definitely one of them. Once the link was shared for the first time, Facebook fetched the page, parsed it and cached the content that it found. Here's a few tips and tricks to beating the Facebook share cache, so you can update your Facebook share content and have it take effect immediately.

Unfortunately, the Facebook share documentation does not mention how to expire their cached content. Basically, you have a couple of options available:

  • Changing the url by appending a query string, e.g. http://example.com?t=1289797014 (using a unix time stamp) or even a more simple approach, http://example.com?v=1 (using a arbitrary version number).
  • Using Facebook's URL Linter tool to enter your url. By submitting your website here, Facebook will fetch, parse and override it's content with the content it retrieves from the lint process.

In addition to clearing the cached content, the URL Linter tool gives you a run down of how Facebook sees the page and some stats about how regularly it has been shared on Facebook.

Cool huh, and easy too!

Ben

  -  http://developinginthedark.com

on 14/11/10

Nice post Tones. I clicked through to the URL Linter tool and happened to stumble upon http://opengraphprotocol.org/ in their URL examples.

The site lists meta tags you can include in your site to tailor the content delivered to Facebook (and other sites that support Open Graph). Combine these with the cache refreshing you've listed (particularly the URL Linter tool) and it becomes a pretty quick way to make sure your content is up-to-date.

Ricardo (Rick) Souza

  -  http://blog.rsouza.net

on 15/8/12

Hi, Thanks for sharing, that's exactly what I was looking for. :)

rumble fighter carat hack,

  -  http://seoviphacks.com/rumble-fighter-hack

1 day, 4 hours ago

Great post. I used to be checking constantly this weblog and I'm impressed! Very useful info particularly the remaining phase :) I maintain such information much. I used to be looking for this certain information for a very long time. Thank you and good luck.

You should leave a comment:

Some tags are allowed: (a, b, blockquote, code, em, i, u, pre, strong).

who am I?

I live in Melbourne. I work at Inlight Media. I'm passionate about web and software development. I like jQuery, CakePHP, Flex. I can code. I can't draw. I play basketball with the Spiderpigs and the Generals. I love snowboarding in the winter and wakeboarding in the summer. I play computer games too often.