Skip to content

fix(core): add server version to frontend chunk file names - #65793

Open
szaimen wants to merge 1 commit into
masterfrom
fix/frontend-chunk-server-version
Open

szaimen wants to merge 1 commit into
masterfrom
fix/frontend-chunk-server-version

Conversation

@szaimen

@szaimen szaimen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Lazy-loaded chunks and their CSS are requested without the ?v= cache buster, so include the server version in their file names to make sure browsers and proxies never reuse them across updates.

Resolves a problem I got while upgrading my AIO-testing instance from Nc34.0.x to Nc35.0.2

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Lazy-loaded chunks and their CSS are requested without the `?v=` cache
buster, so include the server version in their file names to make sure
browsers and proxies never reuse them across updates.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
@szaimen szaimen added this to the Nextcloud 36 milestone Oct 22, 2026
@szaimen
szaimen requested a review from a team as a code owner October 22, 2026 13:43
@szaimen
szaimen removed the request for review from a team October 22, 2026 13:43
@szaimen szaimen added the bug label Oct 22, 2026
@szaimen szaimen added the 3. to review Waiting for reviews label Oct 22, 2026
@szaimen

szaimen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@szaimen

szaimen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But its no problem to reuse the chunks you changed, because the hash is unique, there is no need to add any version or cache buster (thats the whole point of the hash).

What you like talk about are the entry points but those you cannot adjust with dynamic names, so for this we have our importmap in place which should already properly handle this - except your browser does not support importmaps.

@szaimen

szaimen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

But its no problem to reuse the chunks you changed, because the hash is unique, there is no need to add any version or cache buster (thats the whole point of the hash).

In my case it was using outdate assets that were cached. It also pointed me here to the .htaccess file:

        <Else>
            Header set Cache-Control "max-age=15778463"
        </Else>

What you like talk about are the entry points but those you cannot adjust with dynamic names, so for this we have our importmap in place which should already properly handle this - except your browser does not support importmaps.

I am using the lates Chromium version, so pretty sure that that is not the problem.

@susnux

susnux commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

In my case it was using outdate assets that were cached. It also pointed me here to the .htaccess file:

But you only changed the names of assets that are already named based on their content.
The assets you name here already have their hash in the name, so if they change the name changes as well.
Meaning those could not cause the problem you reported.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants