P
Peter Row
Hi,
I have a site were the pages are dynamically generated on demand.
These pages like any static html page may contain image tags and
references to CSS files.
All the images and CSS files etc... are stored in a database so in the
HTML produced for the page the source of an image, for example,
might be:
src=http://www.mysite.com/Res/3/logo.gif
The DLL that runs my site contains a HttpModule that parses each
request when it sees a URL with Res/X/filename in it it extracts the
number X and uses it and the filename to lookup the data in the
database and then does a Response.Write or Response.BinaryWrite
depending on the type of data.
Before it actually writes the data back to the browser it:
With Response
.Expires = 0
.Buffer = True
.Clear()
.AddHeader("Last-modified",......)
.ContentType = Ctype(....., string)
.Cache.SetCacheability(HttpCacheability.Public)
.AddHeader("content-disposition", "filename=" & ....)
.... the decisision of either .Write or .BinaryWrite
End With
However I can see when running through VS.NET that each
time the you visit the page the images etc... are reloaded.
This makes it even worse when you try to load JS to preload
images for roll-over effects, as this JS actually has no effect
and both over and off images a reloaded everytime.
Anybody have any ideas?
Regards,
Peter
I have a site were the pages are dynamically generated on demand.
These pages like any static html page may contain image tags and
references to CSS files.
All the images and CSS files etc... are stored in a database so in the
HTML produced for the page the source of an image, for example,
might be:
src=http://www.mysite.com/Res/3/logo.gif
The DLL that runs my site contains a HttpModule that parses each
request when it sees a URL with Res/X/filename in it it extracts the
number X and uses it and the filename to lookup the data in the
database and then does a Response.Write or Response.BinaryWrite
depending on the type of data.
Before it actually writes the data back to the browser it:
With Response
.Expires = 0
.Buffer = True
.Clear()
.AddHeader("Last-modified",......)
.ContentType = Ctype(....., string)
.Cache.SetCacheability(HttpCacheability.Public)
.AddHeader("content-disposition", "filename=" & ....)
.... the decisision of either .Write or .BinaryWrite
End With
However I can see when running through VS.NET that each
time the you visit the page the images etc... are reloaded.
This makes it even worse when you try to load JS to preload
images for roll-over effects, as this JS actually has no effect
and both over and off images a reloaded everytime.
Anybody have any ideas?
Regards,
Peter