Results 1 to 7 of 7

Thread: HTML Qustion...?.

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300

    Smile HTML Qustion...?.

    Does anyone know if you can code html to first look on the users hd for example.... an image. I know IE supposedly does this by looking in the cache first, and then if not found d/l it. I'm trying to do something similiar.

    Let me try to explain:

    (<a href="http://www.vbworld.com/"><img src="/images/home_off.gif" width="57" height="22" border="0"></a> )

    Can I take the above html code and modify it so the first place it looks for the image home_off.gif would be a folder on the users hard drive. Then if it wasn't found there it would d/l it from the appropriate url. In other words have an option for the image location.

    What I'm trying to do is combine a webbrowser that I'm working on with a particular site. When the browser navigates to the site and the page is d/l...instead of having to d/l all the images for a particular page, it would get the images from a folder on the hard drive. I get the feeling this won't work, but I'd thought I'd ask

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You can use a META tag or the Expires HTTP header to change the expiration date. If you set this to the future, the browser should pull it off the disk until the page expires.

    <META HTTP-EQUIV="Expires" CONTENT="dategoeshere">
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    You would have to program the web browser from the ground up to do that. Its not worth the trouble. Would take an extreme amount of time and coding to make your own. Including parsing of the HTML and displaying colors and positioning, not to mention code to run javascript or other client scripting.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    <img src="file://C:\SomeFolder\picture.jpg"> for Windows.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    That's what I thought....So it's possible to look for the file on the hard drive and of course the image source can also be a URL.

    Isn't there anyway to code it....maybe with Javascript?....so that it first looks on the hard drive as a source for the image, and if it's not found then d/l the image from a URL?

  6. #6
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I suppose it would be possible, but very impractical. It would be easy if javascript had some good built in error checking functions, but unfortunatly, it does not.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    So you think it's possible.....but impractical. Impractical because it might cause errors if the file isn't found on the hard drive? It seems to me the browser would treat it as any other image source and if not found it would timeout and not display an image. Of course if through code there was an alternative source for the file....I don't know?

    I'm no good with Javascript....I'm not even sure what the coding would look like to try and accomplish something like this. If you find some time and are bored....see what you or anyone else for that matter can come up with.

    I'd be interested in any results...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width