$.ajax({ url: 'https://www.google.ca', success: function(response){ console.log(response.string); }, error: function(response){ console.log('server error'); } })