Skip to main content

Bug Tracker

Side navigation

#5044 closed bug (duplicate)

Opened August 13, 2009 11:29AM UTC

Closed October 26, 2010 06:09PM UTC

Last modified March 13, 2012 06:31PM UTC

Problem with js redirect when using getJSON

Reported by: mihaigrigori Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: getJson redirect back button Cc:
Blocked by: Blocking:
Description

The problem I'm facing is as follows. I'm using a JSON call to check

some data before doing a JS redirect to a different page. The redirect

works but it's impossible to get back to the initial page using the

browser's back button. The initial location is not being stored in the

browser's history.

This is the script simplified. If placed on http://site1.example.com/

when it's executed it redirects to http://site2.example.com/ but

there's no way to go back to http://site1.example.com/ using the

browser's back button.

$(document).ready(function(){

$('#click').click(function(){

$.getJSON('index.php?jsoncallback=?', function(msg){

location.href='http://site2.example.com/';

});

});

})

Attachments (0)
Change History (2)

Changed October 26, 2010 06:09PM UTC by addyosmani comment:1

keywords: getJsongetJson redirect back button
resolution: → duplicate
status: newclosed

Changed October 26, 2010 06:09PM UTC by addyosmani comment:2

Duplicate of #5097 .