From 5626948b3fa9d1c9c423809ee64f0ff3c19b4e5e Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 11 Jan 2012 13:10:10 -0500 Subject: [PATCH] Fix #2598 by having jQuery force the browser to not cache JSON responses. --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9a7d93de1..7fda03658 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -55,7 +55,7 @@ module ApplicationHelper def jquery_include_tag javascript_include_tag('//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js') + content_tag(:script) do - "!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\"))".html_safe + "!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\")); jQuery.ajaxSetup({'cache': false});".html_safe end end end