Hey all, I am writing a userscript to test if a given general URL is alive or not. I checked for several web services, but none of them have a free API. (if you find one, please tell!) So I wrote the above code myself.
The only thing I am worried about is its efficiency. For example, what if the URL was a link to a 250 page PDF. It would only fire the `onload` event once the entire pdf has loaded, even though I only wish to check if the PDF _exists_. I am not concerned with the contents of the pdf, but I believe this GET request would fetch that whole pdf. So, my question is how to improve…