Running Web Graphics from Client Hard Drive

By isis_immortal ·
I'm working on a browser-based multiplayer game and we're examining possible solutions for page loading times for dial-up users. What I need to know is how I can set the graphics to load from the client's hard drive if a downloadable graphics pack is offered.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Absolute Paths

by Baron Orlando In reply to Running Web Graphics from ...

One way would be to use absolute paths to the image files in the HTML.

img src="file:///c:/YourAppDir/images/xxx.jpg"

It's not pretty, but it's functional. The biggest issue would be that you would need to make sure that everyone stores the image files on the same drive and in the same folder.

Collapse -

Would this work

by IC-IT In reply to Absolute Paths

substitute %userprofile% for c: ?

img src="file:///%userprofile%/YourAppDir/images/xxx.jpg"

Obviously I know nothing about html, but it is an environment variable.

Collapse -

No windows enrionment variables

by Baron Orlando In reply to Would this work

Great idea, but I couldn't get any of the windows environment variables to work in the HTML. I don't think the browsers translate the paths properly.

Related Discussions

Related Forums