From c55e88567998f168fef12808b6dea5a73b9656ce Mon Sep 17 00:00:00 2001 From: kunw Date: Sat, 9 Jul 2016 16:38:54 +0800 Subject: [PATCH] update for compatiblity with IE11. --- static/resources/js/harbor.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/static/resources/js/harbor.config.js b/static/resources/js/harbor.config.js index b67001fac..026a96fb2 100644 --- a/static/resources/js/harbor.config.js +++ b/static/resources/js/harbor.config.js @@ -21,6 +21,19 @@ $interpolateProvider.endSymbol('//'); }) .config(function($httpProvider) { + //initialize get if not there + if (!$httpProvider.defaults.headers.get) { + $httpProvider.defaults.headers.get = {}; + } + + // Answer edited to include suggestions from comments + // because previous version of code introduced browser-related errors + + //disable IE ajax request caching + $httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT'; + // extra + $httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache'; + $httpProvider.defaults.headers.get['Pragma'] = 'no-cache'; $httpProvider.defaults.headers.common = {'Accept': 'application/json, text/javascript, */*; q=0.01'}; $httpProvider.interceptors.push('redirectInterceptor'); })