JavaScript - Redirect using jquery load

by
Jeremy Canfield |
Updated: April 19 2025
| JavaScript articles
Let's say you want to redirect a user to a remote URL. This can be done using Javascript.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<div id="content-area"></div>
<script>
$(document).ready(function(){
$("#content-area").load("http://www.example.com");
});
</script>
Did you find this article helpful?
If so, consider buying me a coffee over at