Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest C# Code to Download a Web Page

Tags:

c#

Given a URL, what would be the most efficient code to download the contents of that web page? I am only considering the HTML, not associated images, JS and CSS.

like image 662
Krishna Kumar Avatar asked Aug 25 '08 15:08

Krishna Kumar


People also ask

Is 200 Mbps fast?

200 Mbps is one of the most common entry-level internet speed tiers offered by internet service providers. The 100–200 Mbps speed range is considered “fast,” but not “very fast.” In other words, it is an average speed in urban and suburban areas.

Is 100 Mbps fast?

An internet speed of 100 Mbps is fast—but it's not extremely fast. It's just above average for most internet users. While 100 Mbps is enough to stream, game, and Zoom with ease, some users don't need internet that fast, while others need something much faster.

What is a good internet speed?

A good download speed is at least 100 Mbps, and a good upload speed is at least 10 Mbps. With 100 Mbps, you can watch Netflix or YouTube, attend Zoom meetings, and play most online games on several devices at the same time. Some people can get away with fewer Mbps, and others need more.


1 Answers

public static void DownloadFile(string remoteFilename, string localFilename) {     WebClient client = new WebClient();     client.DownloadFile(remoteFilename, localFilename); } 
like image 118
John Sheehan Avatar answered Sep 28 '22 00:09

John Sheehan