Ask a Question related to ASP Components, Design and Development.
-
thisis #1
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
-
flashcom: client side cant access server side
hi all, i hav install the flash com on the PC. It work well, on the server PC, i can access and log in to the 'chat room'.. however, if im... -
Controls with a client side onLoad function or seting a cursor server side
Is there any way to create a web control that calls a client side onLoad function? Its diffucilt since you are not able to access the form or... -
Client side and server side scripting problem
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve... -
Loading Image on the Server/Client side ?
Dear experts, I have made a Flash slide show which shows all the images within a particular folder one by one and repeatedly. There are total... -
button evet ---- server side - client side ???
I want to use button. My question is that How can use server side and client site event at the same time. That is: I want to use button : when... -
Anthony Jones #2
Re: Where to create temporary image files on server/client side?
"thisis" <helloOne@web.de> wrote in message
news:1162037763.167257.27390@i3g2000cwc.googlegrou ps.com...I've been following your attempts to ge to the bottom of this in the asp> 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?
>
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
-
thisis #3
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" <helloOne@web.de> wrote in message
> news:1162037763.167257.27390@i3g2000cwc.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.
>
> Anthonythisis Guest



Reply With Quote

