Solved

Internet explorer cached files

Posted on 2001-06-14
4
189 Views
Last Modified: 2012-05-04
Hi now im at it again,

I am building my own internal browser and need to add save functionality now since an image already has been downloaded to a chache directory there is no point in downloading it from the net again. There for my broblem.
How to get the corresponding filename from the disk. I am using:

htmlWin.event.srcElement.NameProp to get the image name, now internet explorer sometimes renames the files when chaching it an image called banner1.jpg may actually be named banner1[1].jpg on the disk my first question is: is the 1 inside [] the property: htmlWin.event.srcElement.uniqueNumber? or something else.
Next question is: are there a good way to know where the chache directory is? I now that there is a key in the registry under HKEY_Local_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths called Directory but I have noticed that internet exlorer sometimes creates subdirectories and puts the file in there (and ofcourse there are the cache1, cache2, cache3 ... directories)

regards
/Claes


Or mayby there is a way to catch a ondownload event for every object on the html page and steer my browser to cache its files in a different directory? I am using
Webbrowser, htmlDoc and htmlWindow2 components..

Or mayby I could convert the htmlImg to a real Image and save it to disk is this possible?
how to set Image1 = htmlImg?
0
Comment
Question by:clylv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:andyclap
ID: 6190042
Just a quick comment - if you're using the web browser control, it will take care of cacheing for you. If an image is available in the cache, and you're not doing a full refresh, it should pick it up from there rather than doing a GET from the server.
0
 

Author Comment

by:clylv
ID: 6190074
andyclap I now this but MY program needs to get a hold of it (the image) now how I can extract it from the webbrowser control into an Image control?
0
 
LVL 6

Accepted Solution

by:
andyclap earned 50 total points
ID: 6190194
Sorry, I misunderstood the question a bit.
There's some sample code for reading the internet cache at
http://www.vbusers.com/code/codeget.asp?ThreadID=209&PostID=1&NumReplies=0

It should give you some pointers as to how to use wininet.dll's cache functions (which are a bit of a pain as they're not very VB friendly).


0
 

Author Comment

by:clylv
ID: 6190386
andyclap: it is as u say "not very VB friendly" but never the less IT WORKS perfectly

thanx
/Claes
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question