|
Posted by David E. Ross on 03/01/07 01:34
Mike.Duffy wrote:
> What is the default directory in the client file system that is used for
> file urls?
>
> From performing a few experiments, it is clear that an unqualified
> reference from another file url is always directed to the source directory.
>
> I.e., from within url "file://c:/abc/def.htm", if you make a reference like
> <href="ghi.htm">, or <img src="jkl.gif">,the browser will look for
> "file://c:/abc/ghi.htm" or "file://c:/abc/jkl.gif".
>
> But from within url "http://mno.htm", (i.e. a file you put on a web server)
> if you use <href="file://ghi.htm">, or <img src="file://jkl.gif">, exactly
> where does the browser look for the file? I realize that it would likely be
> OS-dependant, but am chiefly interested in the Windows environment. Does it
> use one of those user or system environment variables? Or will it always
> fail? I have not been able to guess where to put the files in order to
> "find" them like this. Does anyone have any suggestions before I take the
> systematic approach of placing a watermarked file into every sub-directory
> in my filesystem and seeing what comes up? I think I can actually do this
> with a small amount of effort using one of those freeware html index
> builder programs, but it would probably take a while to run. (And clean up
> afterwards!!)
In general, an attempt to access a file from a local file system via a
Web page on a Web server will fail. Most newer browsers will reject the
attempt because allowing this creates a security vulnerability. I think
both IE and the various Mozilla browsers will block the attempt.
--
David E. Ross
<http://www.rossde.com/>
Natural foods can be harmful: Look at all the
people who die of natural causes.
Navigation:
[Reply to this message]
|