EOS Low-Code Platform 8 EOS Low-Code Platform 8
  • 8.3.2 (opens new window)
  • 8.3.1 (opens new window)
  • 8.3LA1 (opens new window)
  • 8.2GA (opens new window)
产品简介
学习指南
更新说明
安装与集成
初见EOS
低代码开发手册
专业代码开发手册
专题场景实战
公共服务框架
应用运行治理
升级手册
常见问题
  • html静态资源不缓存

# html静态资源不缓存

html资源如果缓存的话,项目升级后如果有更新前端资源,浏览器需要主动清理缓存才能是升级后的前端介质生效。在 Nginx 上配置不缓存 HTML 文件即可解决此问题。

Nginx具体配置如下:

location / {
            root  ${userDir}${appDir};
            # 配置页面不缓存html和htm结尾的文件
    		if ($request_filename ~* .*\.(?:htm|html)$)
    		{
                add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
            }
            if ($request_filename ~* /remoteEntry\.js$)
    		{
                add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
            }
            index  index.html index.htm;
            try_files $uri /index.html;
        }

← 安全配置指南 内网Linux环境下访问页面出现时间超长故障 →