Skip to content

Commit e92b636

Browse files
committed
add $.ajaxSetup({ cache:false, contentType:'application/json' }); since html is preferred format
1 parent 507f1b4 commit e92b636

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/RedisStackOverflow/RedisStackOverflow/default.htm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
$(function() {
1111
var authUser, userStats, siteStats, qSource = "questions", qLabel = "Latest Questions";
1212

13+
$.ajaxSetup({ cache:false, contentType:'application/json' });
14+
1315
$(document).click(function(e){
1416
var el = e.target;
1517
if (!el.getAttribute("data-cmd")) return;

src/RestFiles/RestFiles/default.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h3>Stop! old, outdated browser detected.</h3>
104104
if (($.browser.msie && $.browser.version < 9) || location.href.indexOf("fakeie") >= 0) {
105105
document.body.className = "lamebrowser";
106106
}
107-
$.ajaxSetup({ cache:false });
107+
$.ajaxSetup({ cache:false, contentType:'application/json' });
108108

109109
function fromDtoDate (dateStr) {
110110
return new Date(parseFloat(/Date\(([^)]+)\)/.exec(dateStr)[1]));

src/ServiceStack.MovieRest/default.htm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<script type="text/javascript">
1111
$(function() {
1212

13+
$.ajaxSetup({ cache:false, contentType:'application/json' });
14+
1315
var restLog = function(method, url) {
1416
if (url.indexOf('?format') == -1) url += '?format=json';
1517
if (method == "GET") url = '<a href="' + url + '" target="_blank">' + url + '</a>';

0 commit comments

Comments
 (0)