This is not possible inside of the browser but if you were to make an ajax request to your webserver, you could ask it do do the verification.
Client Code
$.ajax({
url: "urltest.py",
cache: false,
dataType: "text"
success: function(data){
if(data === "SUCCESS"){
//do things
} else {
//else do other things
}
}
});
Server code
def call_server(self, url):
headers = {'Content-Type': 'application-json'
, 'Accept' : 'application-json'
, 'Accept-Encoding' : 'gzip, deflate'
}
r = requests.get(url)
if r.status_code == 200:
print "SUCCESS"
else:
print "No soup for you"
Hasn't been tested or anything, but you get the idea.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…