brucemand Posted July 9, 2011 Share Posted July 9, 2011 Location Object MethodsMethod Descriptionassign() Loads a new documentreplace() Replaces the current document with a new oneis there a particular time when one wouuld use window.location.replace() instead of window.location.assign()i haven't checked if it makes a difference to the HistoryObj. Link to comment Share on other sites More sharing options...
thescientist Posted July 9, 2011 Share Posted July 9, 2011 is there a particular time when one wouuld use window.location.replace() instead of window.location.assign()i haven't checked if it makes a difference to the HistoryObj.a quick google search gets the job done everytimehttps://developer.mozilla.org/en/window.location#Methodsreplace(url) Replace the current document with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it. Link to comment Share on other sites More sharing options...
brucemand Posted July 9, 2011 Author Share Posted July 9, 2011 a quick google search gets the job done everytimeheh-heh, yeah - just saw many "students" asking lazy questions and thought, yeah - i'll have me some of that as well ! :)for your efforts, i bring you a gift (incase you don't know of it yet) - will serve you with more dramatic effect for your next handling of a lazy student ! http://tinyurl.com/6koytbmEDIT: ooh, looky - this thread is 2nd on the list !! will not be saved in session historyi suppose i was expecting that answer. Link to comment Share on other sites More sharing options...
thescientist Posted July 10, 2011 Share Posted July 10, 2011 heh-heh, yeah - just saw many "students" asking lazy questions and thought, yeah - i'll have me some of that as well ! :)for your efforts, i bring you a gift (incase you don't know of it yet) - will serve you with more dramatic effect for your next handling of a lazy student ! http://tinyurl.com/6koytbmEDIT: ooh, looky - this thread is 2nd on the list !! i suppose i was expecting that answer.IMO, a more practical search (like the one I did) would have been just the window.location object. and yes, I am aware of LMGTFY. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.