I am making a get
request to google.com to check if the site is responding & the response time. I am using JavaScript to achieve it but I am being blocked by the Cross-origin request policy.
I do not want to download any data from the external site (google.com in this example) but only want to check the status & response time.
Any thoughts, how can I achieve it? I am new to JavaScript...
let start = Date.now();
let promise = fetch("https://www.google.com");
let end = Date.now();
alert( `The request took ${end - start} ms` );