history.nette.ajax.js
history.nette.ajax.js copied to clipboard
Add way how to force real redirect
Hi, what is the purpose of assigning redirect value to this.href? I've used old redirect function from nette.ajax and after session is expired, it was redirecting to login page. Now after implementation of history.nette.ajax, there is a problem, because it is not redirecting because of this condition.
if (redirect) {
var regexp = new RegExp('//' + window.location.host + '($|/)');
if ((redirect.substring(0,4) === 'http') ? regexp.test(redirect) : true) {
this.href = redirect;
} else {
window.location.href = redirect;
}
}