4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Facebookいいね!ボタンのキャッシュクリア

Posted at

陥りやすい状況

  • 短縮URLなどでURLは変わらず、その先の遷移を変更するケース。
  • テスト環境URLから本番環境URLへ切り替えた
  • コンテンツ更新で別URLへ切り替えた

起こりうる現象

旧遷移先のOpen Graphタグの内容が キャッシュされたまま更新されない。

解決策

※Facebookいいね!ボタンは、指定URLが変えられないため、どうしようもない。

<fb:like href="短縮URL" width="126" layout="button_count" action="like" show_faces="false" share="false"></fb:like>
  1. Open Graph Object Debuggerへアクセス。
  2. テキストエリアに短縮URLを入力し、デバッグを押下。

結果

対象URLのオブジェクトのプロパティを確認するため、 Open Graphタグが最新の内容に更新される(キャッシュがクリアされる)

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?