0

I'm trying to look at Angularjs (going through Code School demo).

When I make changes to the template they are not reflected when refreshing in the browser. I have tried:

  • hard refreshing (and confirmed code 200 in the apache log)

  • deleting the browser cache (firefox)

  • Renaming the file on the server.

  • Opening in a different browser

    However, copying the file to a new name on the server DOES have the changes be reflected.

regular HTML files that do not include the angular library update as normal.

Making a change to the javascript is reflected immediately (e.g. adding an alert('test')).

Is there something fundamental that I am missing here?

EDIT - Environment Details Running on a Centos6.6 virtual box (Virtualbox) on a mac OS 10.10. Document room is /var/www/dev which is a symbolic link to /mnt/dev which I have mounted via the VirtualBox tools so I can edit the file directly on my mac the VM config Listen 10001

NameVirtualHost *:10001
<VirtualHost *:10001>

DocumentRoot /var/www/dev
    <Directory />
        Options +FollowSymLinks
        AllowOverride None
    </Directory>
</VirtualHost>
Community
  • 1
  • 1
paullb
  • 4,293
  • 6
  • 37
  • 65

3 Answers3

0

Take a look at this and see if the firefox answer by @hadaytullah solves your issues. I would also try it in Chrome. Probably using Angular's template caching somewhere.

Community
  • 1
  • 1
Arthur Frankel
  • 4,695
  • 6
  • 35
  • 56
  • You can fully disable the template cache via: http://opensourcesoftwareandme.blogspot.com/2014/02/safely-prevent-template-caching-in-angularjs.html – Arthur Frankel Jun 02 '15 at 00:58
  • Tried in Chrome and it just gives the latest verison that was also visible in Firefox so it leads me to believe this is a AnglularJS level caching somewhere but I have no idea how to turn it off. I tried @hadaytullah 's answer but that didn't work either. – paullb Jun 02 '15 at 00:59
0

This issue turned out to be a vboxsf issue as per the issue below. The changes made to the filesystem were not getting servered by apache.

https://github.com/yesodweb/wai/issues/315

Workaround: Turn sendfile off in httpd.conf

EnableSendfile off
paullb
  • 4,293
  • 6
  • 37
  • 65
0

The only way it worked for was this: Go to firefox menu -> preferences -> advanced -> Network -> under Cached Web Content click on Clear Now.

vmontazeri
  • 393
  • 2
  • 20