From 088253e5647bbcad8e85af55a9ca38d43aa5466a Mon Sep 17 00:00:00 2001 From: Dale Price Date: Thu, 14 Mar 2013 20:55:02 -0500 Subject: [PATCH] work around a bug in iOS 6 where ajax requests get cached and only work once --- octoprint/static/js/ui.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index c611b31..665693a 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -1391,6 +1391,12 @@ $(function() { webcamViewModel, gcodeViewModel ); + + //work around a stupid iOS6 bug where ajax requests get cached and only work once, as described at http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results + $.ajaxSetup({ + type: 'POST', + headers: { "cache-control": "no-cache" } + }); //~~ Show settings - to ensure centered $('#navbar_show_settings').click(function() {