[thelist] Cookies and images

Joshua Olson joshua at waetech.com
Fri Feb 4 12:57:49 CST 2005


> -----Original Message-----
> From: James Hardy
> Sent: Friday, February 04, 2005 1:26 PM

> > Here's an example of what I'm trying to accomplish...
>  > ...
> >  My thought was to have the
> > information returned as cookies within the image so that I 
> can publish them
> > to the page in appropriate places.
> > 
> Blimey! to me that seems a very complicated way of doing it 
> to me. Are 
> you tied to the idea of using cookies? If not you might want 
> to consider 
> doing it this way:

I'm not so much tied to using cookies as I am tied to only making exactly
one call back to the server from the client for what this single information
object consisting of a jpeg and its meta-data.  The image archive was just
an example to illustrate the technology I'm trying to build.  I like the
idea of encoding the information within the JPEG itself using EXIF, though I
doubt there is a practical way to extract that information with JS.

I'm halfway surprised that the w3 spec didn't account for adding ways to add
meta-information to binary information (downloads, images, sounds, etc) as
they were sent to the browser.  While it is possible to send meta
information via cookies, it doesn't seem to be available in the calling
document in all cases (at least not in IE, which is still, believe it or
not, the most prolific browser available).

Simon, onload may not be supported by the spec, but for some reason it's
triggered by IE/Moz when the image is done loading.  :-)  That being the
case, the cookies returned by the image do not seem to be readily available
using the aforementioned code.  This whole concept may be a bust.  Ugh.

Wait a sec... I just had a ridiculous thought... what if, on the server, I
packaged the jpeg into a JS variable, assigned the meta data to js
variables, and then returned the information using the RPC technique posted
the other day by Keith Gaughan.  Is there a way to "draw" an image from JS
data if it's encoded the right way?

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 




More information about the thelist mailing list