Legacy Knowledge Base
公開されました Sep. 10, 2025

CSSの変更が反映されない

Written By

Ankit Gupta

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

キャッシュがクリアされない限り、CSSの変更はブラウザに反映されません。

環境

  • Liferay DXP 6.2

解決策

ブラウザのキャッシュがクリアされないうちは、CSSの変更がテーマに反映されます。 そのため、 portal-ext.propertiesの "false" として、以下のプロパティを設定し、変更を反映させています。

# Set this property to true to load the theme's merged CSS files for faster
# loading for production.
#
# Set this property to false for easier debugging for development. You can
# also disable fast loading by setting the URL parameter "css_fast_load" to
# "0".
#
theme.css.fast.load=true
# Set this property to true to load the packed version of files listed in
# the properties "javascript.barebone.files" or
# "javascript.everything.files".
#
# Set this property to false for easier debugging for development. You can
# also disable fast loading by setting the URL parameter "js_fast_load" to
# "0".
#
javascript.fast.load=true

theme.css.fast.load と javascript.fast.load のプロパティを無効にする理由(つまり portal-ext.properties で false に設定する) は、Liferay がキャッシュファイルを使うことを制限するため、実行時にデプロイすることができます。そうしないと再起動するまで結果を確認できない場合があります。 ただし、ブラウザのキャッシュが邪魔をする可能性はあります。 これらのプロパティをテストしても、実行時にカスタムwarファイルのファイルに希望の変更を加えることができない場合、変更を反映させるためにwarファイルを再展開する必要がある場合があります。

Did this article resolve your issue ?

Legacy Knowledge Base