Question

I have few css files for a site and some css properties are shared through all of them. Plus there are also few js files. font icons file and images that I constantly updating. Whenever I tried to push to main repository, i had to make sure each file version are bumped using "?=number". I am seriously tired of doing this. Is there a better way to do URL version bumps all together? Any help would be appreciated.

Additional info: I am using IIS7/8 and developing in windows system by using HG Mercurial. Back end uses asp.net visual basic, mysql.

Was it helpful?

Solution

Since you're using ASP.NET, your .NET devs can set a variable that holds a common increment number that you can use as the number in the ?v=number part. So, you just change all of your CSS/JS files to consume the variable one time only. For example:

string version = ConfigurationManager.AppSettings["VersionNumber"];

If you're using bundling, there is a better answer here:

How to make bundles unminify and list individual files when using a cookieless static content server?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top