strm
strm

Reputation: 135

How can I get chrome to stop caching when working on an aspx file in visual studio

I'm currently editing some html/css within a aspx file inside of Visual Studio 2010. I'm using Chrome as my browser. When I make changes inside of Visual Studio and save/ctrl + F5 to run it frequently fails to load the new updated .css file due to pulling old cached versions of the CSS.

I've used visual studio as my primary HTML editor before but when I work with pure html/css files I just save and refresh the file in chrome and it will refresh the updated css 100% of the time. I've only started to experience this problem when working with aspx files and running things via ctrl + f5. Anyone have any ideas of how I can fix this?

Upvotes: 3

Views: 2062

Answers (1)

theChrisKent
theChrisKent

Reputation: 15099

  1. Go to project properties, Web tab
  2. Choose Start External Program in the Start Action section
  3. Paste or browse to the path for Google Chrome (Mine is C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe)
  4. In the Command line arguments box put -incognito

If you would like the browser to open a specific page, then you will need to set the Visual Studio Development Server to use a specific port (ie 4066) then change your command line arguments to include that address, for example: -incognito localhost:4066/Default.aspx

Incognito Mode should prevent caching between sessions and even tabs.

Upvotes: 5

Related Questions