I started out with a basic site.master. After I laid out several pages, I have found that I need to make changes to the site.master. The changes show up while I am working in Visual Studio, but when I run the application, they don't take effect. What do I need to do to have them show up?
When you make changes to CSS or javascript (or any other static content, for that matter), you need to clear out the browser cache to ensure the latest version is loaded from your server.
You can force a reload from the server by using Ctrl + F5 on most browsers.
Related
I have bootstrap in an ASP.NET MVC application. I changed one single value in the bootstrap.css file and now it's not updating. When I actually view the source file in debug mode, it also appears as though I have updated nothing. I have had an issue before where it didn't update upon deployment, and in that case I had to delete the minified file, so I also tried deleting every bootstrap file (aside from the scripts) except bootstrap.css, but still it is as if I never updated it even in debug mode. I used to be able to change the file and the screen would live update in debug mode. It's like somehow I totally locked it but I don't know how.
Starting with the basics, have you definitely hit CTRL + F5 (as opposed to just F5) when viewing the page to ensure that you're not viewing a cached version of the page? I've had a similar issue where, even though changes to a stylesheet are usually picked up when a page is reloaded, sometimes you need to force the cache to refresh to view the page correctly.
I am using Visual Studio 2013, and have a Web Application that I am trying to squash a few bugs. Previously I was able to start debugging, make a change to the user control then refresh the page and see the change. Now I have to stop the debugger and rebuild the entire project before the change shows. I am only changing the markup (things like in-line css, HTML, etc) and not any of the code behind so a recompile shouldnt be necessary. I have verified that this is not a browser cache issue, as I have used several browsers, and cleared the cache after loading the page. I also used incognito mode to make certain nothing was cached. Any ideas on how I can fix this?
I made some changes to the existing asp page. When I access it I don't see the changes yet and I still see the old content. Do I need to recompile .asp files?
The pages are likely cached in your browser. There are a number of ways to get around this. You can:
force a page refresh on the browser ([Ctrl]+[F5])
Recycle the application pool (if this is an application)
(or the dirty way) make a tiny change (like adding a space) to the global.asa which will in turn recycle the app pool
Edit (2017)
If you're debugging using IE then you can also set your cache to refresh every time you visit the page:
Bring up the internet options. Click the Settings button on the Browsing history section of the dialog and change the Check for newer versions of the stored pages: setting to Every time I visit the webpage...
ASP pages are scripting , you do not need to compile , just check if you have page cached on the browser .
I'm just starting to play with Durandal, using the starter kit. I've added a very simple new view/viewmodel combination (essentially a copy/paste of an existing one from the sample) and mapNav()'d the route.
The problem is happening when I try to refresh my browser...the new view simply does not appear. It's not in the nav bar, nor can I navigate directly to the view by typing in the address bar. I know the code is (or should be?!) correct because if I go to the page in a different browser, everything appears as it should.
Is there some browser caching that Durandal is doing somehow? Sometimes F5 or Ctrl+F5 works to refresh, sometimes it doesn't. I also can't deep-link to a specific 'page'. Ie:
http://localhost:52625/#/newpage just gives me a blank
What am I missing?
The option that I use in Chrome is to open developer tools and right-click on the refresh button. There is an option for 'Empty Cache and Hard Reload' which always fixes this issue for me. I don't know the equivalent in IE but try this and see if it fixes your issue.
Most browsers will cache modules returned via RequireJS, which is how Durandal obtains its modules and view models.
CTRL+F5 doesn't help because that just refreshes the initial page - all the modules are still requested using javascript (RequireJS), so they are usually pulled from cache first.
I've found it's best to disable caching in your browser's developer tools. Doing so will ensure that all network requests are loaded directly from the source and not from cache.
See this question for additional information: Debugging when using require.js cache
Another solution is configure RequireJS to set its urlArgs property: https://stackoverflow.com/a/8479953/91189
This solution works ok, but makes it harder to debug, at least in Chrome, because breakpoints are lost every time the module is loaded, since it's technically a different file being requested each time.
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?
Go to project properties, Web tab
Choose Start External Program in the Start Action section
Paste or browse to the path for Google Chrome (Mine is C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe)
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.