?
Solved

Temporary internet files - Locating the cache file name

Posted on 2006-04-28
21
Medium Priority
?
753 Views
Last Modified: 2010-04-06
Greetings,

This is basically a DHTML + VBScript related question.

In Internet Explorer, when I visit a website, the page is cached in my Temporary Internet Files folder, and the "View Source" command then uses the local file.

Example:

"E:\Temporary Internet Files\Content.IE5\MD0Z8TCB\page2[1]"

I'm wondering if it's possible to get the actual path (cached) of the current web page we're browsing in IE? Any DHTML methods available?

Thanks.
0
Comment
Question by:sramesh2k
  • 8
  • 6
  • 4
  • +1
20 Comments
 
LVL 11

Assisted Solution

by:WelkinMaze
WelkinMaze earned 500 total points
ID: 16565605
Hi,

I would say it is not possible. If it is possible it could lead to security issues. So I think if there is a way it would be due to some bug and in fact not very legal.
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16565747
@WelkinMaze,

I'm not sure ... why would that be a security issue?  The view source is (typ.) always available in some form or other.  The cached file exists on the client machine.  The index.dat file which crossreferences the url to the cached file location and name exists on the client machine and can be read and decoded by third party software (e.g.: index dat spy at: http://www.stevengould.org/software/indexdatspy/ , or index.dat scanner at: http://www.extramile.ro/ids_overview.html )

Also, see: http:Q_20099896.html

Possibly the answer in the experts-exchange question above, being for Visual Basic, could be implemented as VB Script?  This would not violate security, I believe, if it could only display the info on the client machine.  I agree, now that I think of it, that making the contents of index.dat available back to the server would be a severe violation of security.  I believe 100% of people surfing the web don't want the websites they surf to know that much detail about where they've been.

Just as the security model doesn't allow some server info to be accessed by the client, it also does not allow certain client information to be accessed by the server.  If sramesh2k is asking about displaying the cached location of a file on the client, that should be doable - by the client on the client.

Peace and joy.  mvan
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16565809
@mvan01,

It's just what I'm thinking.
I've tried to look at the http:Q_20099896.html link that you've posted but the links in the accepted answer do not open. And I haven't seen at that thread something that confirms the sramesh2k's request is doable. You've agreed with me it is a violation of security to send such info to the server. But if the client can get such information it could also send it to the server... So, that's why I'm thinking this way. But of course, I can be wrong.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Assisted Solution

by:mvan01
mvan01 earned 500 total points
ID: 16566432
Hi WelkinMaze,

Yes, the links didn't work.  It would now be:
http://vbnet.mvps.org/index.html?code/fileapi/index.html

Peace and joy.  mvan
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16567324
>> If sramesh2k is asking about displaying the cached location of a file on the client, that should be doable - by the client on the client.

That's exactly what I needed, mvan01. I'll explore your links. Thanks

@WelkinMaze: I don't see any security issue here, as what I'm talking is about client side, and the "View source" operates the same way.

0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16568559
Ok, if you find a way, please, let me know. I'll be glad to see it.
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16568660
Not yet, WelkinMaze :(
Looks like the only way is to use API
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16568681
I intuitively sense that this is not quite proper but I'll not mind if I'm wrong.
0
 
LVL 14

Accepted Solution

by:
Esopo earned 1000 total points
ID: 16574033
In IE (and in Windows) you can do an ActiveX call to the scripting object to get access to the filsystem. Once you have access to the file system you can do this in any way you would do it on any programming language.

http://www.elated.com/tutorials/programming/asp/filesystem_object/


HOWEVER,

You have to remember you are on a browser. IT IS A MAJOR SECURITY PROBLEM and will at the very least raise warnings. Under SP2 it will probably flat-out not work. Many Antivirus software block it too, even if your user would want to allow something described by a warning as a "possible malicius script". And, of course, even if you get it to run it only works on IE and Windows and other browsers may support it with the help of plugins.

To answer your question:
>>Any DHTML methods available?
No. It is only possible through heavy programming (including external libraries) and requires the users to take extra steps to decrease security on their system to allow the script to work. Generally it is not a good idea to try this as client script running on a browser, you are much better off asking your user to download an application.
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16574966
I was trying to add the "view source" functionality to the IE context-menu, and learnt (From your responses) that it's not possible using scripting. Thanks to everyone responded.
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16574971
>> "view source" functionality to the IE context-menu

In addition to the in-built "view source" (which launches the default editor), I wanted to add another (which launches my preferred application)
0
 
LVL 14

Expert Comment

by:Esopo
ID: 16575015
You can get the source of your page with normal Javascript using the DOM
document.documentElement.innerHTML

...and you can display it to your users on the browser. But you can't do anything outside of the browser which includes launching any applications... unless you were to save that code with a different extension that the system understands.

For example, if you link to a PDF, the browser will ask the system for the default application to run it and get Acrobat (if it is installed in the user machine). You can't force a PDF to open in Acrobat, but it is a pretty safe bet that it will because most people have it. If you have your users associate an extension with your preferred application, say .myx for this example, you could then save your page as .myx on the server an when linking to it, the browser will theorically ask the system for a default application for the extension and get your preferred application. (I say theorically because some systems may ban unrecognized file formats).
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16577053
Hi sramesh2k,
so what is the solution of your question?
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16578173
WelkinMaze,

Looks like it's impossible to accomplish this using scripting.
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16578484
Then why you gave the points to the others? Look at the first answer you have received. Don't you think I have said the same?
And as is written in the help of EE site, sometimes the best answer is simply "you can't do this".
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 16582832
Because I found the other answers detailed, thought they say "you can't do this".
May be someone can re-open the question on my behalf, so that I can revise / split it accordingly?
0
 
LVL 14

Expert Comment

by:Esopo
ID: 16582884
I don't mean to be a jerk here, and I don't mind what you do with your points, but:

>>I would say it is not possible. If it is possible it could lead to security issues. So I think if there is a way it would be due to some bug and in fact not very legal.<<
That is not an answer, that is a guess. And not accurate either, there is a clear legal method and has nothing to do with bugs.
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16583596
@Esopo,
see the question and see my and your answers!
"And not accurate either, there is a clear legal method and has nothing to do with bugs."
I am still waiting for the legal method to do the wanted task with scripting.
You have answered something that is not asked and claim that my statement which answers the initial question is inaccurate. Very interesting...
btw I've been in this industry for so long to know that almost everything is possible but also I have been in school and I can read. So you cannot read or really behave like a jerk?!?

@sramesh2k,
mvan01 claimed that it is possible. You found that it was not possible. But gave points to him for a wrong response but not to me for correct one. Very interesting...

sramesh2k, to reopen the question you have to post a zero points question in the community support (http://www.experts-exchange.com/Community_Support/).
0
 
LVL 14

Expert Comment

by:Esopo
ID: 16584408
WelkinMaze,

It appeast to me you are missguided. So, I will humor your attack with a response out of curtesy, once. Then I will stop answering you.

>>see the question and see my and your answers!
I even quoted you.

>>I am still waiting for the legal method to do the wanted task with scripting.
It is up there, posted, by me.

>>You have answered something that is not asked
I have answered exactly what was asked, and then further adviced the asker. Try and learn, these skills could come up handy in the future.

>>I have been in school and I can read.
Good for you, although it is kind of apparent since we are having a WRITTEN argument.

>>So you cannot read
Oh, Lord.

Finally, read the MA:
http://www.experts-exchange.com/memberAgreement.jsp

It is not about how you feel about this thread, it is about the site rules. Your answer was insufficient. You sort of guessed it right, the asker owes you no points, and certainly not an A.

Have a good day.
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16584572
Yes, Esopo, it seems you've teached the asker really well since this is his "Looks like it's impossible to accomplish this using scripting."
Don't wanna argue with you. It doesn't make any sense.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

807 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