I am developing a windows application in c# in which I am showing a web page using web browser control, and I want to store the content of the web page in a cache. How can i do?
1 Answer
If you simply store the DocumentText property of the control, that will only enable you to cache the HTML content. Objects such as Images and stylesheets won't be cached.
If you want to also cache images and stylesheets then, you will need to parse the contents of the DocumentText property and retrieve objects such as images and stylesheets from the web server they are stored on and keep a local copy, then update the links in the DocumentText property to point to the local versions.
Use the WebClient class to download a copy of an object on a remote web server.