Why has my bootstrap.css file stopped updating? - css

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.

Related

CSS not refreshing - now deleted, not cached, inexistent - and still loading? How? Why?

I'm working on a Wordpress website and I have styles loaded from two stylesheets - original style.css and style-custom.css for additional style.
Unfortunately whatever I do, the styles do not refresh. I already tried to press Shift+F5 without success.
I've purged the server and browser cache entirely several times (even though it's actually permanently turned off via WP Engine). I've removed appended ?ver numbers to force the update of the file content.
Right now I've even deleted the file and it is still loading in the browser! Even worse - it's loading in all browsers that I have not even ever used on the damn site.
I don't know what else to do. The file is gone and the cache has been purged.
There is definitely some sort of caching mechanism still. Are you developing on your own server? If you try to refresh on somebody else's computer are they able to see the file?
If yes - then you need to contact the servers' administrator, or you hosting provider with clarification.
You should be developing your websites locally though, and once they are ready publish them on the web.

Changes not reflected in User Controls when debugging

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?

Edits in .asp net website wont show

i've got an issue with website made in asp.net. A site is published and online, i've made some modifications, republished site on my computer and just uploaded a .aspx file into the server via ftp.
First time it seems to have worked after a while. But i've made a small error and want to edit it again, i did the same, but it wont change. Could it be that i need to wait some time before changes are seen? Or could it be that there needs to be a server restart or something?
If you've edited something in the aspx.cs page you will need to upload the bin directory to the remote site, or better still republish the whole site.
If it is a change to the .aspx, css or javasctipt file, the original will most likely be cached in your browser. Try a differrent browser brand or refreshing the page, ctrl-f5 does a complete refresh.
If this error was by any chance a CSS mistake, that can be easily fixed by adding a "?" at the end of the address since CSS files are normally stored in the cache of the browser and the ? tells the browser to update them. Same thing is true about JavaScripts which are kept in individual files
I'd recommend you to use the Visual Studio Publish Website under the Build instead of manually uploading the site over FTP. That built in publisher provides you many advantages of which one of them is the same issue you have faced. When you make a small change, fixing the error in host would be very faster by republishing the site that way rather than manually upping it over FTP.

How can I properly refresh a Durandal SPA web app when new views are added?

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.

Site.Master Changes

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.

Resources