Bundling and minification is sending old styles
-
18-06-2021 - |
문제
I was followed this article to setup bundling and minification, http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification.
I thought it was working great, until I updated some css, but I kept getting the old style. I am working in firefox, I have cleared my cache, restarted my browser, restarted IIS, and even restarted my computer, and nothing is working.
When I turn off bundling and minification
BundleTable.EnableOptimizations = false;
The new styles show up and the page looks as it should. Turn bundling and minification back on and I get the old styles again. Also, whenever I rebuild or change one of the css files, there is is a new chache busting token. So you would think that it is sending different content, but I still get the old stuff. I even added a test class to one of the css files, then downloaded the minified css file, but the test class I added is not there.
Has anyone else run into this problem?
해결책 2
Don't I feel like the bonehead. Apparently I am working too many hours. I had a style.min.css file that the optimizer was using, but I was making changes to style.css. I even knew that is what the optimizer did, but I... Well no excuses. It was a brain fart.
다른 팁
Follow my instructions under Debugging Bundled and Minified JavaScript to figure out what you're doing wrong.
rebuild or change one of the css files, there is is a new chache busting token Verify you are using RC and not beta. Rebuilding will not change the cache busting token, only a change will.