.NET 2.0 image load issues

R

Roy

Hey all,
I just installed 2.0 today. I've been enjoying 1.1 for so long I didn't
want to change. :)
Anyways, I converted over a web project from 1.1 to 2.0. No problemo.
Then I noticed something very bizaare. Here's my short and simple CSS
code:

SPAN, #lblSailDate
{
width:100px;
text-align:center;
border:none 0px;
background-image:url(images\horizontal_middle.gif);
}
BODY
{
background-image:url(images\topBack.png);
background-repeat:no-repeat;
background-position:50% 0%;
font-family:Arial;
background-color:#F5FFFA;
}
H1
{
color:White;
text-align:center;
position:relative;
font-family:Times New Roman;
}
#scrolling_div
{
height:70%;
overflow:auto
}

Basically, the web page displays a Repeater within a DIV with the
#scrolling_div attributes above. The Repeater contains a series of
SPAN's (which use the attributes above as well). My question lies in the
repeating of the background image in the SPAN's. The background image is
a simple 1kb image that is tiled. In 1.1 the page loaded very rapidly. I
believe that the 1kb image was sent ONCE and only once, then tiled on
the client side.

What's happening in 2.0 is that the 1kb image is sent EVERY SINGLE TIME.
Meaning it's loaded from the server every time it's tiled. Which in my
case, means about 5000 times. I'm getting really tired of seeing "3162
Items Remaining(Downloading Picture.....)" at the bottom of the screen.

What gives? Anyone know how to stop this bottleneck?

TIA
 
J

Joerg Jooss

Hello Roy,
Hey all,
I just installed 2.0 today. I've been enjoying 1.1 for so long I
didn't
want to change. :)
Anyways, I converted over a web project from 1.1 to 2.0. No problemo.
Then I noticed something very bizaare. Here's my short and simple CSS
code: [...]
Basically, the web page displays a Repeater within a DIV with the
#scrolling_div attributes above. The Repeater contains a series of
SPAN's (which use the attributes above as well). My question lies in
the repeating of the background image in the SPAN's. The background
image is a simple 1kb image that is tiled. In 1.1 the page loaded very
rapidly. I believe that the 1kb image was sent ONCE and only once,
then tiled on the client side.

What's happening in 2.0 is that the 1kb image is sent EVERY SINGLE
TIME. Meaning it's loaded from the server every time it's tiled. Which
in my case, means about 5000 times. I'm getting really tired of seeing
"3162 Items Remaining(Downloading Picture.....)" at the bottom of the
screen.

What gives? Anyone know how to stop this bottleneck?

Unless you're serving your CSS programmatically (e.g. using a HttpHandler),
this has nothing to do with ASP.NET. The file is served directly by IIS.

Is that image accidentally configured to be non-cacheable?

Cheers,
 
R

Roy

Hi Joerg,
Thanks for the reply. I'm going to admit my ignorance on this matter.
How can I tell if an image is "non-cacheable"? I'm going to research
cacheing in 2.0, but if you get to this email before I figure it out,
please point me in the right direction! Thanks!
 
R

Roy

Very bizaare, but I've got the solution (I think). For whatever reason,
the behavior I've mentioned occurs only when running the site in Visual
Studio 2005. When the site is actually published it runs fine.

Back to the grindstone with me.
 
J

Joerg Jooss

Hello Roy,
Hi Joerg,
Thanks for the reply. I'm going to admit my ignorance on this matter.
How can I tell if an image is "non-cacheable"? I'm going to research
cacheing in 2.0, but if you get to this email before I figure it out,
please point me in the right direction! Thanks!

It's a web server specific feature. IIS for example allows you to attach
custom HTTP headers to all files located in one folder, whereas iPlanet can
apply them to files based on regular expressions. If you' re using a standard
installation of IIS on your XP box, no caching headers will be attached by
default.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top