问题
css-file is named: style.css?v=1
the link inside of html: <link rel="stylesheet" href="style.css?v=1">
Contrary to the classic style.css
the style.css?v=1
doesn't get recognised:
Failed to load resource: the server responded with a status of 404 (Not Found)
Did I miss something? What's important to versioning files and where does the syntax ?v=1
come from?
回答1:
- The expression style.css?v=1 for the browser means a dynamic file like "fetch me the file style.css with a parameter named "v" set to 1". As long as you change the value of the v parameter, the file will be fetched as a new unique url.
- The expression style.css?=v1 has no meaning.
- The expression style.css?1 could also work.
来源:https://stackoverflow.com/questions/53429814/link-a-css-file-with-version-number-for-cache-busting