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

js_loader_modulesファイルを圧縮(Gzipping)する。

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

learn-legacy-article-disclaimer-text

問題

js_loader_modules ファイルを読み込むのに時間がかかり、ポータルのパフォーマンスが低下しています。 js_loader_modules ファイルがGzip化されているか否かを識別する:

  1. Chromeのシークレットウィンドウでポータルを開く。
  2. F12キーを押して、「ネットワーク」タブに切り替えます。
  3. ヒット http://localhost:8080.
  4. js_loader_modules ファイルを検索してください。
  5. Response Headerの中で、 Content-Type:text/javascript;charset=UTF-8 を検索する

環境

  • Liferay DXP 7.0

解決策

  1. Fix-pack de-55 以上が必要です。
  2. portal-ext.properties に、これらのプロパティを追加します:
    # If the user can unzip compressed HTTP content, the GZip filter will
    # zip up the HTTP content before sending it to the user. This will speed up
    # page rendering for users that are on dial up.
    #
    com.liferay.portal.servlet.filters.gzip.GZipFilter=true

    #
    # Enter a URL to automatically launch a browser to that URL when the portal
    # has fully initialized. Enter a blank URL to disable this feature.
    #
    browser.launcher.url=
  3. 以下のフォルダーを削除します:
    liferay/osgi/state
    liferay/work
    tomcat/work
    tomcat/temp
  4. サーバーを起動します。

js_loader_modules ファイルが Gzip されているかどうかを確認する。

  • Chromeのシークレットウィンドウでポータルを開く。
  • F12キーを押して、「ネットワーク」タブに切り替えます。
  • http://localhost:8080に移動します。
  • js_loader_modules ファイルを検索してください。
  • レスポンスヘッダーの内側で、 Content-Encoding: gzipを検索します。
did-this-article-resolve-your-issue

legacy-knowledge-base