Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Refresh css style after changes
I have vaadin portlet in liferay and custom css style. After I have changed css I can't see changes
in browser before I clean cache. This is problem in production because I can't say to every end user
that she/he have to clean browser cache. Every time when I change css files I manually copy it to ROOT/html/VAADIN/themes/ folder.
Is it there any trick to update styles in clients?
There is an open issue that is directly related to this: Theme should be refreshed when Vaadin version is updated
We'll be fixing it by adding proper Last-Modified/Etag and Cache-Control headers to all theme resources when they are server by our own ApplicationServlet.
I'm not totally sure about the situation when Liferay is involved. Are you using the old Portlet 1.0 or Portlet 2.0? If the theme resources are served directly by the Tomcat that runs Liferay, then Tomcat should be configured to add all the proper headers to those theme files. If the files are served by the Vaadin servlet, then you'll just have to wait for the fix or patch it yourself (there's a comment in the above ticket that explains what needs to be done).
The issue "Theme should be refreshed when Vaadin version is updated" is only a problem when serving the themes through the servlet. In case the themes are served by the Liferay server (copied to html/VAADIN/..) the server should take care of telling the browser if the files have been updated. If I remember correctly Liferay is somehow caching the resources and will not immediately start serving the new files. I think somebody on the forum had a solution for how to turn the caching off, allowing immediate updates.