Last active
December 7, 2015 11:14
-
-
Save savitskiyan/b9a688a4b9d426bc1dc8 to your computer and use it in GitHub Desktop.
Disable IE caching in angularjs application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module(ApplicationConfiguration.applicationModuleName) | |
.config(['$httpProvider', function($httpProvider) { | |
//initialize get if not there | |
if (!$httpProvider.defaults.headers.get) { | |
$httpProvider.defaults.headers.get = {}; | |
} | |
//disable IE ajax request caching | |
$httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT'; | |
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache'; | |
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache'; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment