mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Don't replace pushState() if emulated, as it will re-load the new URL via ajax, effectively duplicating every request in IE (#7002)
This commit is contained in:
parent
83adffd7cd
commit
1091c7b944
@ -160,7 +160,8 @@
|
||||
}
|
||||
|
||||
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it.
|
||||
if(window.History.enabled) {
|
||||
// Causes non-pushState browser to re-request the URL, so ignore for those.
|
||||
if(window.History.enabled && !History.emulated.pushState) {
|
||||
var url = xmlhttp.getResponseHeader('X-ControllerURL');
|
||||
if(url) window.History.replaceState({}, '', url);
|
||||
}
|
||||
|
@ -88,7 +88,8 @@ jQuery.noConflict();
|
||||
|
||||
$('.cms-edit-form').live('reloadeditform', function(e, data) {
|
||||
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it
|
||||
if(window.History.enabled) {
|
||||
// Causes non-pushState browser to re-request the URL, so ignore for those.
|
||||
if(window.History.enabled && !History.emulated.pushState) {
|
||||
var url = data.xmlhttp.getResponseHeader('X-ControllerURL');
|
||||
if(url) window.history.replaceState({}, '', url);
|
||||
}
|
||||
@ -250,8 +251,9 @@ jQuery.noConflict();
|
||||
newContentEl.css('visibility', 'visible');
|
||||
newContentEl.removeClass('loading');
|
||||
|
||||
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it
|
||||
if(window.History.enabled) {
|
||||
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it.
|
||||
// Causes non-pushState browser to re-request the URL, so ignore for those.
|
||||
if(window.History.enabled && !History.emulated.pushState) {
|
||||
var url = xhr.getResponseHeader('X-ControllerURL');
|
||||
if(url) window.History.replaceState({}, '', url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user