-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StaticResource url versioning #2157
Comments
Not sure if I want to have the feature in aiohttp. Do other libraries/frameworks have the feature? Do nginx support file hashes? |
Yes, another web frameworks already have same feature https://www.google.com.ua/search?q=asp.net+core+mvc+append-version this feature implementation very similar to asp.net core mvc implementation. |
Ok |
* add StaticResource.url append_version arg * add 2157.feature * 2157.feature contributor * sort contributors.txt * add documentation for StaticResource.url_for append_version arg #2157 * update read file code to be compatible with windows python 3.4 * fix flake8 line len issues * add append_version param to StaticResource constructor and add_static method docs and tests is updated to reflect changes * add more tests and docs for StaticRoute append_version * removed outdated comments * add ValueError exception catching for follow_symlinks and more tests
Done by #2158 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Add feature for generating urls to static files with version hash to have more control over caching in browser.
Expected behaviour
When you resolve url from
StaticResource
you can useappend_version
flag to add a hash of file (version) into url, which will change if file content changed and than for browser it's will be new url (which not exists in cache and will be reloaded)Example
with
append_version
flagStaticResource
will appendv
param into url query string with hash of the fileThe text was updated successfully, but these errors were encountered: