Skip to content

Add support for versioning resources [SPR-7402] #12060

Closed
@spring-projects-issues

Description

@spring-projects-issues

Jeremy Grelle opened SPR-7402 and commented

As a user, I would like support for resource versioning so it is possible to get the benefits of caching with the ability to refresh changes.

Implementation option #1


Automatic versioning with file timestamps e.g. /resources/main.123456789.css

Implementation option #2


Manual versioning with version number e.g. /resources/version-1.0.0/main.css

Both options would require ResourceHttpRequestHandler to strip out the version number from the request URI to obtain the "real" resource path. In addition, a view helper function or tag would be needed to generate versioned URLs e.g. <spring:resource name="main.css"/> might generate http://localhost:8080/app/resources/main.123456789.css.

Resources:
http://stackoverflow.com/questions/118884/what-is-an-elegant-way-to-force-browsers-to-reload-cached-css-js-files
http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/


Affects: 3.0.2

This issue is a sub-task of #12058

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: taskA general task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions