EDN Admin
Well-known member
Hello board, i am new here and i need some help (if possible)
I have a c# project where i use the webbrowser control (its mandatory), it works great but i cant find the solution to a
problem, i want to save an image to the hard drive without requesting it from the server a second time, the image is generated
randomly so if i use URLDownloadToFile() i will get a new image and not the image displayed in the browser page, i know its
possible to do this because in Internet Explorer if i right click on an image and click on "save picture as" i will get the
image displayed on IE and not a new image from the web server, i tried to get the image from cache but it is not there...
The http header of the image is like this:
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: image/jpeg
Date: Mon, 01 Sep 2008 17:18:17 GMT
Server: lighttpd
[ image data fits here..... ]
So i guess the image wont go to cache because the header tells the browser not to cache it
Anyone know how to solve this problem? Is there some way i can get the image directly from webbrowser control ?
Short version -> I need to download an image directly from the page displayed on the webbrowser control on my c# project...
Thanks.
View the full article
I have a c# project where i use the webbrowser control (its mandatory), it works great but i cant find the solution to a
problem, i want to save an image to the hard drive without requesting it from the server a second time, the image is generated
randomly so if i use URLDownloadToFile() i will get a new image and not the image displayed in the browser page, i know its
possible to do this because in Internet Explorer if i right click on an image and click on "save picture as" i will get the
image displayed on IE and not a new image from the web server, i tried to get the image from cache but it is not there...
The http header of the image is like this:
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: image/jpeg
Date: Mon, 01 Sep 2008 17:18:17 GMT
Server: lighttpd
[ image data fits here..... ]
So i guess the image wont go to cache because the header tells the browser not to cache it
Anyone know how to solve this problem? Is there some way i can get the image directly from webbrowser control ?
Short version -> I need to download an image directly from the page displayed on the webbrowser control on my c# project...
Thanks.
View the full article