Issue
- While working on theme development and deployment, both on Development and Production environments, it will be necessary to clear the server and browser's cache in order to see the changes done on the theme resources like JS and CSS files
Environment
- Liferay DXP 7.0+
Resolution
- For a Development environment, add this property in your
portal-ext.properties
file:include-and-override=portal-developer.properties
. After this is done, restart the server.
You may find all information at Using Developer Mode with Themes. Please note, this may have impact on the portal's performance and it is therefore not advised for production environments. - For a Production environment, the supported way is to:
-
-
- Shut down the server
- Delete the following folders:
Liferay/osgi/state
,Liferay/work
,Tomcat/work
andTomcat/temp
- Place the updated version of the theme in the
deploy
folder - Restart the server
-
This is necessary as a server configured for production caches very aggressively in order to optimize the performance. To elaborate, not using portal-developer.properties
negates the possibility of deploying JS/CSS resources changes in a theme without restarting the server. In other words: development needs an underlying development configuration to optimally work.
Additional Information
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In