在Chrome中运行1小时后,浏览器的内存缓存将被清除

时间:2019-03-04 22:15:10

标签: angularjs google-chrome caching iis memorycache

我面临清理内存缓存的问题。

我没有在缓存头中设置任何最长期限。请在下面找到IIS HTTP响应标头设置

Enter image description here

下面是应用程序中的Httpservice代码:

 constructor($http: ng.IHttpService,
        $q: ng.IQService, $rootScope: ng.IRootScopeService,
        exceptionHandlerSerice: IExceptionHandlerService) {
        $http.defaults.headers.common["X-XSS-Protection"] = "1; mode=block";
        $http.defaults.headers.common["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains; preload";
        $http.defaults.headers.common["X-Content-Type-Options"] = "nosniff";
        $http.defaults.headers.common["Cache-control"] = "no-store";
        $http.defaults.headers.common["Pragma"] = "no-cache";
        this.$http = $http;
        this.$q = $q;
        this.$rootScope = $rootScope;
        this.exceptionHandler = exceptionHandlerSerice;
    }

如何避免从Chrome清除1小时的缓存?

0 个答案:

没有答案