Posted By

vagrantradio on 05/20/11



Versions (?)

jQuery Redirect

 / Published in: jQuery

If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.

  1. // simulates similar behavior as an HTTP redirect
  2. window.location.replace("");
  4. // simulates similar behavior as clicking on a link
  5. window.location.href = "";

Report this snippet  

You need to login to post a comment.