From 42434aed175f9f74468f6f5293c2b6cbbd835d34 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Thu, 13 Mar 2014 15:20:11 +0200 Subject: [PATCH] fixed IE problem with caching application/json request --- application/Espo/Core/Application.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/Espo/Core/Application.php b/application/Espo/Core/Application.php index 40937c6d96..603fdb9547 100644 --- a/application/Espo/Core/Application.php +++ b/application/Espo/Core/Application.php @@ -1,4 +1,4 @@ -getSlim()->hook('slim.after.router', function () use (&$slim) { $slim->contentType('application/json'); + + $res = $slim->response(); + $res->header('Expires', '0'); + $res->header('Last-Modified', gmdate("D, d M Y H:i:s") . " GMT"); + $res->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); + $res->header('Pragma', 'no-cache'); }); }