SDReyes
SDReyes

Reputation: 9954

ASP.Net MVC: Centralizing CSS and JS dependencies

I'm using jQuery plugins in an ASP.Net MVC site.

I've often to include CSS and JS files as required by the plugins I use in every page. So I want to centralize all those dependencies in a single place in my app. thus if a dependency for a given plug-in is changed or updated, I'll only have to modify a single place in my app.

I've thought in two possible solutions:

Do you have any other idea? what do you think of both proposals?

Upvotes: 0

Views: 387

Answers (1)

Matt Smith
Matt Smith

Reputation: 1231

Could http://combres.codeplex.com/ provide you with a framework for this.

My only personal objection to this method is that each individual pages will have a unique JavaScript/CSS file where as if you combined and compressed everything into one and simply used classes and events to trigger the JavaScript enhancements as and when needed your site would run a lot faster.

Upvotes: 4

Related Questions