Forum Moderators: open

Message Too Old, No Replies

Linking to the User's Local Hard Drive

IE6 won't let me

         

knighty

3:30 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On a site I am developing, content will be downloaded to the clients hard drive (lots of large images etc) to make put less strain on the server.

The link works fine on windows 98 and earlier browsers but nothing happens in IE6.

Is is disabled? If so how do I enable?

joshie76

3:38 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Knighty I'm confused :s.

What are you trying to do? Do you have an example? How are you 'downloading' to the clients computer? So many questions...

knighty

4:00 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just want to link to pages on the persons hard drive as they will already have these files on thier machine.

i.e file:///C:/somedir/somesubdir/filename.html

the above and variations of it will not work in IE.

joshie76

4:16 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you might have more luck if you put your slashes back instead of forwards.

I just tried it and it works fine for me both ways...

Xuefer

4:21 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



replace C: with C¦

g1smd

6:36 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do you know where on the hard drive the files are going to go? How do you know they even use Windows? Don't use absolute paths.

Filipe

6:45 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



Yeah, relative paths are the way to go. Code it just as you would for the web, but instead of linking to:

file:///C:/somedir/somesubdir/filename.html

Just link to

filename.html (if it's in the same directory)
or
somesubdir/filename.html (if it's a directory deeper)
or
../filename.html (if it's a directory higher)

knighty

8:21 am on Apr 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the response guys but I had already tried changing the format of the link.

BUT it does'nt work! :( Thats why I posted here :P

I have no problem linking to the hard drive from hard drive, the problem is linking from a website to hard drive.

I can even link from a site to a hard drive on previous OS's and browsers but with IE6 and win2k its a no go.

I'm thinking its more of a security issue or some setting.

Has anyone tried hosting a page on the web and linking to thier drive?

RonPK

10:11 am on Apr 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Has anyone tried hosting a page on the web and linking to thier drive?

No problems with IE 6 / Win ME, even with security level set to highest.

knighty

12:00 pm on Apr 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



wierd...other machines in office with 98/IE6 work - just not win2k

Xuefer

1:23 pm on Apr 9, 2003 (gmt 0)

10+ Year Member



in my box
win2k ie6sp1
file://D¦\abc\def.html works
file://D¦/abc/def.html works

even file://D:/abc/def.html works

but i don't know what's your html/frame/script

pixel_juice

1:27 pm on Apr 9, 2003 (gmt 0)

10+ Year Member



What you have to keep in mind is that you are not linking to a particular user's hard drive, you are linking to a path that you are hoping exists on their hard drive. Try changing your link to just <a href="file:///C:/">c drive</a> and see if it works. If it does the problem is with your particular link, not this type of link in general.

Because different people have different directory structures and drive letters, I can't see how doing this would ever be useful...

Hey let's try this now:

[url=file:///C:/]c drive[/url]

Darn, WW doesn't allow non-http links...

knighty

3:14 pm on Apr 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>Because different people have different directory structures and drive letters, I can't see how doing this would ever be useful...

I'm basically doing an extension of our intranet so everyones machine is going to be set up in exactly the same way.

As for file:///c: etc I have tried every combination I can think of in a standalone test page - no frames,CSS - just plain HTML and still doesnt work. I do have a c: drive and the the link works fine locally and on other machines just not win2Kpro/IE6 :(

Xuefer

4:21 pm on Apr 9, 2003 (gmt 0)

10+ Year Member



what i said is "file://"
but u guys said "file:///"

that may be the difference

but file:/// also works for me

and i think "file://" is standard as "http://"
the 3nd / just because on *nix system
everything start with /
it's not true in win

Xuefer

2:40 am on Apr 10, 2003 (gmt 0)

10+ Year Member



seems "file:///" is right :P
but it actually works on my win2k advsrv ie6sp1
with all patches done

ricfink

2:58 am on Apr 10, 2003 (gmt 0)

10+ Year Member



Sounds to me like a cross-domain security issue. There are features in IE6 to prevent pages from one domain to access pages in another domain.

check out MSDN for more info.

You may ultimately have to change to using an .hta page to get around the security restrictions for all users. With an hta, the user, in essence, gives permission on pageload for the site to access local files.

joshie76

7:36 am on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



from accessing maybe... but linking to? - that shouldn't be a threat.

knighty

9:18 am on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Joy! Found a solution - added my site to "Trusted Sites" in under options and it works now :)

Still not sure why it works for other people though?

ricfink

1:41 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



There are gradations in security in IE6 - you've discovered one way of handling the problem.
But don't you have to make sure this works for everybody without having to issue special instructions?

knighty

3:00 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



don't you have to make sure this works for everybody without having to issue special instructions?

Ideally, yes but since I have no idea how to do that this looks like the only option.

Brett_Tabke

3:31 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Both of the following work in ie/moz/opera.

file://localhost/c:/Program%20Files/
file:///C:/Program%20Files/

g1smd

7:19 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Let's hope no one finds a way to do:
file:///C:/Windows\Command\Format%20C:%20/u%20/y

ricfink

3:27 am on Apr 11, 2003 (gmt 0)

10+ Year Member



Sounds like that would simplify everybody's life a little, g1smd.
Back to pen and paper. cool.