Professional Web Applications Themes

Where to create temporary image files on server/client side? - ASP Components

Hi All, please do not post answers if your not familiar with my topic. i have this scenario: a server with a data base that has record fields that store/retrieve binary data. an asp page with valid components is supposed to retrieve the binary data, and create from it image temporary files e.g.. bmp,jpg,gif. where is it more likely to create the temporary image files, on the server side or on the client side. i feel the subject may be a bit trivial to some, but i new to this, my logic says that temporary image file should be created ...

  1. #1

    Default Where to create temporary image files on server/client side?

    Hi All,

    please do not post answers if your not familiar with my topic.


    i have this scenario:

    a server with a data base that
    has record fields that store/retrieve binary data.

    an asp page with valid components is supposed to retrieve the binary
    data,
    and create from it image temporary files e.g.. bmp,jpg,gif.

    where is it more likely to create the temporary image files,
    on the server side or on the client side.

    i feel the subject may be a bit trivial to some, but i new to this,
    my logic says that temporary image file should be created on the client

    side. the consideration are obvious, making the server less busy with
    each request of several clients. on the other hand/side comes the
    security
    issues. if i my server was to create these temporary image files,
    How to i get the clients temporary cache folder,
    some clients may be using internet explorer, others firefox/opeara and
    so..
    OR
    What object shell i use to get clients temporary cache folder
    - if it's possible?

    thisis Guest

  2. #2

    Default Re: Where to create temporary image files on server/client side?


    "thisis" <helloOneweb.de> wrote in message
    news:1162037763.167257.27390i3g2000cwc.googlegrou ps.com...
    > Hi All,
    >
    > please do not post answers if your not familiar with my topic.
    >
    >
    > i have this scenario:
    >
    > a server with a data base that
    > has record fields that store/retrieve binary data.
    >
    > an asp page with valid components is supposed to retrieve the binary
    > data,
    > and create from it image temporary files e.g.. bmp,jpg,gif.
    >
    > where is it more likely to create the temporary image files,
    > on the server side or on the client side.
    >
    > i feel the subject may be a bit trivial to some, but i new to this,
    > my logic says that temporary image file should be created on the client
    >
    > side. the consideration are obvious, making the server less busy with
    > each request of several clients. on the other hand/side comes the
    > security
    > issues. if i my server was to create these temporary image files,
    > How to i get the clients temporary cache folder,
    > some clients may be using internet explorer, others firefox/opeara and
    > so..
    > OR
    > What object shell i use to get clients temporary cache folder
    > - if it's possible?
    >
    I've been following your attempts to ge to the bottom of this in the asp
    general group.

    Here is a synopsis of the solution I would propose.

    An img tag points to a resource on the your web site like this :-
    [url]http://mysite/dynamicimgs/160.gif[/url]

    However dynamicimgs folder contains only a file called 404.asp.

    In IIS manager a custom handler for the 404 error is set to the url
    /dynamicimgs/404.asp

    Now the attempt to access any file in this folder including 106.gif would
    result in 404.asp being executed instead.

    The 404.asp will receive a query string containing the path that could not
    be found hence it can harvest the image ID requested.

    Having got the ID you can create a temporary gif file (include an ID unique
    to the session in the file name)

    Now the ASP code sets the Response Status back to 200 OK. It also sets the
    content type to image/gif. Set expires to the number of minutes you would
    like the client to cache the image for. Also set the cachecontrol property
    to max-age=nnnn where nnnn is the number of seconds the client should cache
    the image for. Add a Last-Modified header to help the client to determine
    the content is cacheable.

    Pump the GIF out to the response then delete the file. An better
    alternative is to change the image generating DLL to pump the image directly
    to an implementation of IStream and give the Response object to it. This
    would eliminate the temporary file from the solution.

    Now from the clients point of view it get just receives a normal gif image
    which it can cache in the normal manner that it would. How long its allowed
    to to cache it can be controlled by your code.

    Anthony



    Anthony Jones Guest

  3. #3

    Default Re: Where to create temporary image files on server/client side?

    Hi Anthony Jones,

    thank you so much for the detailed answer & synopsis,
    now i understand the topic clearly!

    Anthony Jones wrote:
    > "thisis" <helloOneweb.de> wrote in message
    > news:1162037763.167257.27390i3g2000cwc.googlegrou ps.com...
    > > Hi All,
    > >
    > > please do not post answers if your not familiar with my topic.
    > >
    > >
    > > i have this scenario:
    > >
    > > a server with a data base that
    > > has record fields that store/retrieve binary data.
    > >
    > > an asp page with valid components is supposed to retrieve the binary
    > > data,
    > > and create from it image temporary files e.g.. bmp,jpg,gif.
    > >
    > > where is it more likely to create the temporary image files,
    > > on the server side or on the client side.
    > >
    > > i feel the subject may be a bit trivial to some, but i new to this,
    > > my logic says that temporary image file should be created on the client
    > >
    > > side. the consideration are obvious, making the server less busy with
    > > each request of several clients. on the other hand/side comes the
    > > security
    > > issues. if i my server was to create these temporary image files,
    > > How to i get the clients temporary cache folder,
    > > some clients may be using internet explorer, others firefox/opeara and
    > > so..
    > > OR
    > > What object shell i use to get clients temporary cache folder
    > > - if it's possible?
    > >
    >
    > I've been following your attempts to ge to the bottom of this in the asp
    > general group.
    >
    > Here is a synopsis of the solution I would propose.
    >
    > An img tag points to a resource on the your web site like this :-
    > [url]http://mysite/dynamicimgs/160.gif[/url]
    >
    > However dynamicimgs folder contains only a file called 404.asp.
    >
    > In IIS manager a custom handler for the 404 error is set to the url
    > /dynamicimgs/404.asp
    >
    > Now the attempt to access any file in this folder including 106.gif would
    > result in 404.asp being executed instead.
    >
    > The 404.asp will receive a query string containing the path that could not
    > be found hence it can harvest the image ID requested.
    >
    > Having got the ID you can create a temporary gif file (include an ID unique
    > to the session in the file name)
    >
    > Now the ASP code sets the Response Status back to 200 OK. It also sets the
    > content type to image/gif. Set expires to the number of minutes you would
    > like the client to cache the image for. Also set the cachecontrol property
    > to max-age=nnnn where nnnn is the number of seconds the client should cache
    > the image for. Add a Last-Modified header to help the client to determine
    > the content is cacheable.
    >
    > Pump the GIF out to the response then delete the file. An better
    > alternative is to change the image generating DLL to pump the image directly
    > to an implementation of IStream and give the Response object to it. This
    > would eliminate the temporary file from the solution.
    >
    > Now from the clients point of view it get just receives a normal gif image
    > which it can cache in the normal manner that it would. How long its allowed
    > to to cache it can be controlled by your code.
    >
    > Anthony
    thisis Guest

Similar Threads

  1. flashcom: client side cant access server side
    By u_sq in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: June 28th, 09:16 PM
  2. Controls with a client side onLoad function or seting a cursor server side
    By Geoff Davis in forum ASP.NET Building Controls
    Replies: 3
    Last Post: January 15th, 03:54 AM
  3. Replies: 9
    Last Post: October 17th, 07:25 PM
  4. Loading Image on the Server/Client side ?
    By jonesjones webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 1
    Last Post: October 14th, 05:24 PM
  5. button evet ---- server side - client side ???
    By yaya coco in forum ASP.NET General
    Replies: 1
    Last Post: July 4th, 10:58 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139