简体   繁体   English

如何清除AngularJs服务器缓存和Cookie?

[英]How to clear in AngularJs server cache and cookies?

I am Using AngularJS on my website. 我在我的网站上使用AngularJS。 After updating my content and hosting it on the server, it shows the previous content only. 更新我的内容并将其托管在服务器上后,它仅显示以前的内容。 I cleared my browser history and cookies but it still shows the old content only. 我清除了浏览器的历史记录和cookie,但仍仅显示旧内容。 I set in the .htaccess file ExpiresByType to a minimum, like 0 sec, 1 sec but still, the old content only shows. 我在.htaccess文件ExpiresByType设置为最小值,例如0秒,1秒,但仍然显示旧内容。 In Hostgator.in, I have a demo server where I uploaded the website. 在Hostgator.in中,我有一个演示服务器,我在该服务器上上传了网站。 The new content shows. 显示新内容。 But in hostgater.com I have my official server there. 但是在hostgater.com中,我的官方服务器在那里。 I uploaded the new content and it doesn't show. 我上传了新内容,但没有显示。

Please help me. 请帮我。

Use cache:false in your route file and use 在路由文件中使用cache:false并使用

$ionicHistory.clearCache();
$ionicHistory.clearHistory();

in controller.js file I hope this solve your problem. 希望在controller.js文件中能够解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM