不让页面缓存css js
![]()
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
// Initialize get if not there
if
(!$httpProvider.defaults.headers.get) {
$httpProvider.defaults.headers.get = {};
}
// Enables Request.IsAjaxRequest() in ASP.NET MVC
$httpProvider.defaults.headers.common[
"X-Requested-With"
] =
'XMLHttpRequest'
;
//禁用IE对ajax的缓存
$httpProvider.defaults.headers.get[
'Cache-Control'
] =
'no-cache'
;
$httpProvider.defaults.headers.get[
'Pragma'
] =
'no-cache'
;