angularjs - Apache storing cache of js file -
i updated web applications front end built in angularjs on remote server hosted on rackspace , server has previous version of same web app uploaded me 1 day before update . uploading done local ( git push ) -> bitbucket -> remote server ( git pull ) . after uploading reloaded web page in firefox still loading previous version , tried same in private window of firefox , new chrome window still loading previous version . tried these things :
1) upload used ,
git add --all git commit -m "my commit" git push origin master
here origin bitbucket repository url of web app . on server did
git fetch git reset --hard origin/master
this works me every time , , php files updated after uploading files angularjs or js file's old version served .
2) checked if managerservice.js file updated on bitbucket ensure git push worked , there new version of file on bitbucket .
3) checked file on server using vim , managerservice.js file has new updated code on server .
4) loaded url of managerservice.js giving absolute url ( eg. www.example.com/js/services/managerservice.js) of file in phone , still old file served . quite sure happening because of apache creating cache of js file googled , ran command on terminal of server mentioned in url ( http://www.ubuntugeek.com/how-to-clear-cached-memory-on-ubuntu.html )
sync; sudo echo 3 > /proc/sys/vm/drop_caches
5) changed sequence of lines changed in managerservice.js , , did upload again .
but still no success . git cloned project in new directory , worked . if face same issue time should new updated file .
i think rackspace serves static content through cdn. check there can avoid this. faced same issues google app engine environment. change file name , deploy application solve problem.
Comments
Post a Comment