This wouldn't be hard to do at all. All you really need to do is change one line in the file "PageHeadBuilder.cs" in the "UI" folder in "Nop.Web.Framework". Line 604 is where it creates the bundle text.
What you could do is change this part of the line:
urlHelper.Content("~/bundles/" + outputFileName + ".min.css"), MimeTypes.TextCss)
urlHelper.Content("~/bundles/" + outputFileName + ".min.css?" + (new Random()).Next()), MimeTypes.TextCss)
and then it would create a random number attached to the end of the file's name, which will force the browser to download a new version every time. I've done something like this before on a project with often updated .js files so the client could get the latest version and see the changes.timmit wrote:
Here's what I would like to see fixed -
When you make changes to your theme's style.css file, NopCommerce will generate a new bundled CSS with the exact same name as the old one. Because of the way browsers cache CSS files, this means your users are left with an old version of your styles until they hard-refresh.
It seems NopCommerce will only use a new name for the bundled CSS if you change the name of your styles.css, so my workaround has been to change the styles.css filename every time I make changes - eg.. styles1.css, styles2.css, styles3.css