legacy-knowledge-base
公開されました Sep. 10, 2025

Thu, 01 Jan 1970 00:00:00 GMT」の値を持つexpiresヘッダーとは、どのような意味ですか?

written-by

Mariano Alvaro

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • HTMLコンテンツを取得する際に、以下のようなヘッダー/バリューが見受けられます: Expires: Thu, 01 Jan 1970 00:00:00 GMT
  • Expires ヘッダーとともに、以下のものもレスポンスで送信されます:
    • Cache-Control: private, no-cache, no-store, must-revalidate
    • Pragma: no-cache

Environment

  • ブラウザのキャッシュが無効になっているLiferay環境。

解決策

  • このヘッダーは、HTMLコンテンツに対するブラウザのキャッシュを無効にするために設定されます。 このオプションは、すべてのユーザー(認証済みおよびゲスト)または認証済みユーザーのみに対して設定可能です。
  • 以下のプロパティを使用することで、目的の動作を得ることができます:
 #
# Set this to true if you want the portal to force the browser cache to be
# disabled. It will only disable the cache for the rendered HTML response.
# It will not have an impact on static content or other resources.
#
# Env: LIFERAY_BROWSER_PERIOD_CACHE_PERIOD_DISABLED
#
browser.cache.disabled=true

#
# Set this true if you want to disable the cache for authenticated users.
# This property is not read when the property
# "browser.cache.signed.in.disabled" is true. This is useful to ensure that
# authenticated users cannot go to the sign in page by clicking on the back
# button in their browsers.
#
# Env: LIFERAY_BROWSER_PERIOD_CACHE_PERIOD_SIGNED_PERIOD_IN_PERIOD_DISABLED
#
browser.cache.signed.in.disabled=true
  • ブラウザのキャッシュを有効にすると、ユーザーの観点からはダウンロード速度が大幅に向上しますが、キャッシュをクリアしないと古いコンテンツが表示される可能性があるため、推奨(デフォルト)オプションとして無効化されています。

did-this-article-resolve-your-issue

legacy-knowledge-base