Is it possible to hit servers like https://www.google.com, https://www.facebook.com through javascript or Ajax and get the response status like 200, 403. if it is possible can you share me that code.

My requirment is I need to pass a urls like https://www.gmail.com, htps://www.facebook.com andwants to get response status like 200 or 403 throgh javascript or Ajax