問題
js_loader_modules ファイルを読み込むのに時間がかかり、ポータルのパフォーマンスが低下しています。 js_loader_modules ファイルがGzip化されているか否かを識別する:
- Chromeのシークレットウィンドウでポータルを開く。
- F12キーを押して、「ネットワーク」タブに切り替えます。
- ヒット http://localhost:8080.
-
js_loader_modules ファイルを検索してください。 - Response Headerの中で、
Content-Type:text/javascript;charset=UTF-8 を検索する
環境
- Liferay DXP 7.0
解決策
- Fix-pack de-55 以上が必要です。
-
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= - 以下のフォルダーを削除します:
liferay/osgi/state
liferay/work
tomcat/work
tomcat/temp - サーバーを起動します。
js_loader_modules ファイルが Gzip されているかどうかを確認する。
- Chromeのシークレットウィンドウでポータルを開く。
- F12キーを押して、「ネットワーク」タブに切り替えます。
- http://localhost:8080に移動します。
-
js_loader_modules ファイルを検索してください。 -
レスポンスヘッダーの内側で、 Content-Encoding: gzipを検索します。