2026.3.4: published folders (/assets) are cached without validation - old CSS/JS after a deployment
Hi support,
a bug / feature request for the published folders and cache settings:
Environment: Universal 2026.3.4, linux-x64 package in our own container image on Kubernetes.
Files of published folders (for example /assets/theme/shell.css) are served with Cache-Control: public, but without max-age, ETag or a version in the URL. After a deployment, browsers keep showing the old CSS and JavaScript. In our test even a hard reload did not help until we appended ?v= to the URL. PSU's own assets are versioned (?v=2026.3.4-...), so they do not have this problem.
Could published folders send Cache-Control: no-cache together with ETag or Last-Modified validation, or offer a setting for the cache headers? Today we append a content hash to every stylesheet URL ourselves.
Thanks,
René
Hello Mordecai,
Thank you for the detailed report.
We reproduced it on PowerShell Universal 2026.3.4, with the Linux container image and Chrome.
Files in a published folder are sent with "Cache-Control: public" and a "Last-Modified" header that comes from the file's write time.
There is no "ETag" and no "max-age".
PowerShell Universal also always sends the full file, never a 304 Not Modified.
Today, published folders have no setting to change these headers.
Here is why the old CSS and JavaScript stay in the browser.
When a response has no "max-age", the browser guesses how long it can reuse it.
The usual guess is 10% of the time since "Last-Modified".
For example, a file last written 300 days ago can be reused for about 30 days without asking the server.
Files in a container image often keep an old or fixed date, so this window can be long.
In our test, the browser kept the old files after a deployment, both when the page was opened again and after a normal reload.
A hard reload fixed a plain HTML page, but not a PowerShell Universal app.
Files listed in New-UDApp -Stylesheets and -Scripts are added by the app after the page loads, and Chrome kept serving them from its cache even on a hard reload.
If you load your files that way, this explains what you saw.
If you load them from plain HTML, a cache in front of PowerShell Universal can do the same thing, because "Cache-Control: public" lets an ingress or a CDN store the file.
I have reported this to the PowerShell Universal team as a bug (ticket SFC-1235, for internal reference only).
The report includes your request for "no-cache" with "ETag" or "Last-Modified" checks, or a setting for the cache headers.
Until it is fixed, these options work:
Keep the content hash in your stylesheet and script URLs. This is the most reliable fix, and it is what PowerShell Universal does for its own files.
Set "Cache-Control: no-cache" for the /assets/ path on your ingress or reverse proxy. Make sure it replaces the header instead of adding a second one. We tested this, and the browser then showed the new files at every step, in an app too. Browsers that already cached a file keep it until it expires, so change its URL once when you turn this on. Since PowerShell Universal always sends the full file, each page load downloads it again, which is fine for small files.
I will update you here when I have news from the team.
Published folders documentation: https://docs.devolutions.net/powershell-universal/platform/published-folders/
HTTP caching background: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching
Best regards,
Patrick Ouimet