我有一个通过Spring Boot备份的Web应用程序。为了提高性能,我想使用浏览器端缓存,以便可以存储图像并最小化对图像服务器的调用。 为此,我们传递了“ Cache-Control”标头作为响应,其值为“ public,max-age = 3600”。在chrome中可以完美运行。
但是,对于IE来说,它不起作用。使用相同的请求或刷新,浏览器正在调用图像服务器。 如果我做错了任何建议。 下面是响应头
- Accept-Ranges: bytes
- Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-
Type, Access-Control-Request-Method, Access-Control-Request-Headers,
Pragma, cache-control, if-modified-since, Authorization, responseType
- Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE
- Access-Control-Allow-Origin: *
- Access-Control-Expose-Headers: Content-Disposition
- Access-Control-Max-Age: 3600
- Cache-Control: public, max-age=3000
- Content-Type: image/jpeg; charset=UTF-8
- Date: Thu, 23 Aug 2018 11:38:19 GMT
- Edge-Control: !no-store,max-age=1800, downstream-ttl=0
- ETag: "5e5b4dc401b845a995aca8b701081314623e2e5bd985c363199be5bb1b608f6e"
- Expires: 0
- Persistent-Auth: true
- Pragma: no-cache
- Server: Apache-Coyote/1.1
- Set-Cookie: md=1; domain=.xxxx.com; path=/; secure
- Transfer-Encoding: chunked
- X-Application-Context: api-gateway:prod:8080, marvin-proxy:prod:8067
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- X-XSS-Protection: 1; mode=block