| Below are the different methods to redirect from one page to another using different code
(1)window location different code
window.location.replace('http://www.crackyourinterview.com')
window.location.assign('http://www.crackyourinterview.com')
window.location.href = 'http://www.crackyourinterview.com'
document.location.href = '/path'
(2)window history code
window.history.back()
window.history.go(-1)
(3)window navigate which use for old versions of IE
window.navigate('www.crackyourinterview.com')
(4)probably no bueno code
self.location = 'http://www.crackyourinterview.com';
top.location = 'http://www.crackyourinterview.com';
(5)jQuery code
$(location).attr('href','http://www.crackyourinterview.com')
$(window).attr('location','http://www.crackyourinterview.com')
$(location).prop('href', 'http://www.crackyourinterview.com') | | |