0
votes

Im developing an AngularJS app which is hosted online and webbhotell. The app uses 12-15 partials. I use chrome with cache disabled within the devTools and in incognito mode. Mac OS X Mountain lion.

When I make changes to the a css, html or even a JS file I have to wait like 10 minutes and refresh the browser several times to see the changes. This is so irritating.

I have tested on the latest version of safari, chrome and Firefox. Caching and history disabled in all of them with no success. What is going on? How may I fix this? Anything to do with the server?

index.html

 <meta name="fragment" content="!"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
2
As seen in Screenshot here,Nothing is cached in the browser. It might be the case where you forgot to build the code or editing some wrong file. - Rax
I have not forgotten anything. I have also tried another ftp client(Transmit) with sublime text. The remote files change when I save the code. However the browser wont show the changes immediately. It takes 5-10 minutes. This is really strange. - user2241980

2 Answers

0
votes

This isn't really an issue with angularjs.

Just remember though, if you put a meta http-equiv in your index.html that doesn't necessarily mean that those header-overrides will be taken in to account for any files other than the file they reside in.

Sounds like it might be a server headers issue.

In chrome there is a feature under the development console called 'Network'. I'd take a look at that and see what the headers are on css/js files coming from your app.

Having said that, even if the server is sending cache-control headers, disabling cache in chrome should solve the problem so I'm not really sure why that isn't working.

0
votes

I have contacted the hosting provider and they have fixed the issue. The varnish cache had been on. Everything works fine now.