In my MVC project I use both Web Optimizer and Cassette. The main reason I choose Cassette is because it has the ability to "inject" javascript and css to the html header/bottom body section from partial view or child action (or from anywhere). The reason I still use Web Optimizer is because it can have different bundles for files in the same directory (in comparison that Cassette default one bundle per folder, which does not work sometimes, for example, many different themes are in just one folder because they share files).
In my project I used a lot of third party jQuery plugins in different places. I bundled them together, and then in different pages I use the Bundles.Reference() to add to a page when it is needed. For example, in one page, I could use 5 plug-ins, and another page could use 6 plug-ins.
Bundles.Reference("content/plugins/plug1.js", "body");
Bundles.Reference("content/plugins/plug2.js", "body");
Bundles.Reference("content/plugins/plug3.js", "body");
When the page is rendered, Cassette would generate a tag for each of the references.
The main reason we use bundle is to try to reduce the requests to server whenever it is possible. But in this situation, the Cassette does not reduce the requests for javascript. It just like the same thing that I add the tag for each plugin (but I cannot inject to header/body bottom from partial view/child action).
So my question comes: is it possible that Cassette can "bundle" the different References that I use in different pages into just one single tag?
Many thanks in advance!