Replace Vary header with explicit xhr=1 param
IE10 doesn't respect the Vary header.
This commit is contained in:
parent
1ae7872ed8
commit
a5b784bdf7
4 changed files with 4 additions and 5 deletions
|
@ -235,7 +235,7 @@ $(document).ready(function () {
|
|||
page.pushstate = page.popstate = function(path) {
|
||||
$("#content").addClass("overlay-sidebar");
|
||||
map.invalidateSize();
|
||||
$('#sidebar_content').load(path, function(a, b, xhr) {
|
||||
$('#sidebar_content').load(path + "?xhr=1", function(a, b, xhr) {
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ $(document).ready(function () {
|
|||
var page = {};
|
||||
|
||||
page.pushstate = page.popstate = function(path, type, id) {
|
||||
$('#sidebar_content').load(path, function(a, b, xhr) {
|
||||
$('#sidebar_content').load(path + "?xhr=1", function(a, b, xhr) {
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ OSM.Export = function(map) {
|
|||
|
||||
page.pushstate = page.popstate = function(path) {
|
||||
$("#export_tab").addClass("current");
|
||||
$("#sidebar_content").load(path, function(a, b, xhr) {
|
||||
$("#sidebar_content").load(path + "?xhr=1", function(a, b, xhr) {
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ OSM.History = function(map) {
|
|||
|
||||
page.pushstate = page.popstate = function(path) {
|
||||
$("#history_tab").addClass("current");
|
||||
$("#sidebar_content").load(path, function(a, b, xhr) {
|
||||
$("#sidebar_content").load(path + "?xhr=1", function(a, b, xhr) {
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
|
|
|
@ -423,7 +423,6 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def map_layout
|
||||
response.headers['Vary'] = 'X-Requested-With'
|
||||
request.xhr? ? false : 'map'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue