XSLT: Loading Single Image Multiple Times

L

Larry Marburger

I've built an XSLT that is used to generate a simple TreeView-type,
web-based control (ASP.NET / C#). When the tree is fully transformed
(client-side, JavaScript transformation), there are about 5 different
images that are referenced (page.gif, folder.gif, plus.gif, minus.gif,
and clearpixel.gif). What I assumed would happen would be that once it
loads page.gif, every place in the transformed HTML document that
references page.gif would load at the same time. However, what really
happens is the client will request the image page.gif for each and every
instance of page.gif on the resulting HTML document.

As it stands now, the tree has 600+ nodes. This results in 5 separate
images on the page, but ~2,400 image requests. This is, obviously,
highly unacceptable.

Any ideas about how to minimize the amount of image requests sent to the
server?
 
T

Teemu Keiski

Hi,

cache the images folder in IIS. E.g pick up the images folder
(right-click->Properties), select HTTP Headers tab and there check 'enable
content expiration'. Then just specify the time you wish IIS to cache images
for.

-
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top