$(document).ready(function() { var workspaceId = '2'; $.ajax('http://azurejupyterredirect.net/home/workspace/' + workspaceId) .then( function(url) { window.open(url); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>