Legacy Knowledge Base
Published Jul. 2, 2025

Cache-Control header in static resources is missing when running Liferay from Developer Studio

Written By

Gábor Komáromi

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.

Issue

  • Cache-Control header is not present in static resources when running the portal from Developer Studio and setting com.liferay.portal.servlet.filters.header.HeaderFilter=true property in portal-ext.properties does not help.

Environment

  • Liferay DXP 7.1
  • Liferay Developer Studio

Resolution

  • The issue is present when developer mode is turned on in Liferay Developer Studio. Turning it off and commenting out include-and-override=portal-developer.properties in portal-ext.properties solves the problem.
  • To turn developer mode off: Select the Liferay 7.x server in the Servers window. In its Overview, under the Liferay Launch untick 'Use developer mode'.

Additional Information

  • The following property is set in portal-developer.properties by default and is responsible for the issue:
    com.liferay.portal.servlet.filters.header.HeaderFilter=false
Did this article resolve your issue ?

Legacy Knowledge Base