1

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.

Engineer2021
  • 3,288
  • 6
  • 29
  • 51
user2734550
  • 952
  • 1
  • 12
  • 35
  • 1
    It would be helpful if you provided us with some additional information such as what version control software you are using and your operating system. – Patrick Allen Mar 30 '14 at 23:00
  • If you're talking about rewriting URLs to force *browsers* to bump them, then we need to know what server-side language, framework, etc you are using as well. – IMSoP Mar 30 '14 at 23:12
  • I am using IIS7/8 and developing in windows system by using HG Mercurial. Biscally back end team uses asp.net visual basic, mysql. – user2734550 Mar 30 '14 at 23:18

1 Answers1

1

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?

Community
  • 1
  • 1
Neil Cresswell
  • 1,145
  • 8
  • 20