Rails 页面在完成权限时总是出现加载缓存页,导致加载出admin权限json渲染页。查看了浏览器请求,是页面cache引起,以下是解决方案:1234567before_filter :set_cache_headersdef set_cache_headers response.headers["Cache-Control"] = "no-cache, no-store" response.headers["Pragma"] = "no-cache" response.headers["Expires"] = "Fri, 01 Jan 2016 00:00:00 GMT"end