Javascript How-ToAsk your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Can we access the browser cache from javascript? Though i am quite sure that using javascript we can get 'all' objects from the document (page) but i am not sure if we can get the physical location (from the browser cache) of these objects like images etc.
Hi Baburman,
Do you mean to get images from Server Physical Locations directly?
If so then ,i think it's not possible.(think about the virtual path mapping to physical path)
Are you talking about somethink like this link ?? http://p2p.wrox.com/topic.asp?TOPIC_ID=23047
Well vinod, this is a good example of loading images directly from the server, but what i need is the
physical path of the images on the client not the server. I guess (but not sure) that i have to
access the browser cache but don't know how to get it.
Consider the scenario when my browser looking for a page in "ServerXYZ".
It sends a request to that server(Serverxyz)
Now this server process the page,looks for the folders if any image is required to shown on the page.
Even if this time virtual path setting works behind the scene.
Serverxyz only sends the HTML contents to the browser.Browser only knows how to render it and it
renders the images/text as specified by the tags.
Hope this will help you.
Looking for other answers too
quote:Originally posted by baburman
Can we access the browser cache from javascript? Though i am quite sure that using javascript we can get 'all' objects from the document (page) but i am not sure if we can get the physical location (from the browser cache) of these objects like images etc.
I am afraid it didn't much help. In fact the server renders the html page as well as all other objects like images, activex controls, css files and swf objects etc to the client. The browser receives them and puts them in its cache and then shows up the page with all of its objects. Now we can access the entire html source and all objects using javascript in this page or document. This is where i wanna get the location of these objects in the browser cache may be using document or navigator object or else. Ok, if javascript can not do it, is there any other way out? Please note that i am developeing a windows application in .NET.
Struggling, I have found getting it another way using windows API calls. Still working on it.
However this has become irrelevant to this JS forum. Anyway thankyou for the replies.