Quantcast
Channel: Is there a faster way to check if an external web page exists? - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by Gil Allen for Is there a faster way to check if an external web...

I simply used Fredrik Mörk answer above but placed it within a method:private bool checkURL(string url) { bool pageExists = false; try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);...

View Article



Answer by Marcin Deptuła for Is there a faster way to check if an external...

You could do it using asynchronous way, because now you are waiting for results after each request. For few pages, you could just throw your function in ThreadPool, and wait for all requests to finish....

View Article

Answer by ZombieSheep for Is there a faster way to check if an external web...

static bool GetCheck(string address){ try { HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest; request.Method = "GET"; request.CachePolicy = new...

View Article

Answer by nos for Is there a faster way to check if an external web page exists?

One obvious speedup is to run several requests in parallel - most of the time will be spent on IO, so spawning 10 threads to each check a page will complete the whole iteration around 10 times faster.

View Article

Answer by Fredrik Mörk for Is there a faster way to check if an external web...

I think your approach is rather good, but would change it into only downloading the headers by adding w.Method = WebRequestMethods.Http.Head; before calling GetResponse.This could do it:HttpWebRequest...

View Article


Is there a faster way to check if an external web page exists?

I wrote this method to check if a page exists or not:protected bool PageExists(string url){try { Uri u = new Uri(url); WebRequest w = WebRequest.Create(u); w.Method = WebRequestMethods.Http.Head; using...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>