473,796 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT: Loading Single Image Multiple Times

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?

Nov 18 '05 #1
1 1342
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

"Larry Marburger" <no@spam.com> wrote in message
news:vJ******** **********@fe29 .usenetserver.c om...
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?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3338
by: Ed | last post by:
I first noticed this in my own app. Images would show up missing randomly on IE 6.0.2800.1106 on Windows 2000 server. I then was able to repro this problem on Microsoft's website!!! The page I used was http://www.microsoft.com/windows/ie/downloads/critical/ie6sp1/default.asp After pressing to refresh the page six times, I noticed missing images on the page. This problem seems to be very reproducible. I coded a sample ASP page...
12
3239
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the client (browser). But, the XSLT transormation (xml->html) doen't happen! I have XSLT files for this, they work, I mean when I put the output of the app as an XML file on some server, and make it use the XSLT files to transform into HTML, it works, I get a HTML page.
2
2169
by: Larry Marburger | last post by:
I've built and 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...
7
2871
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID parameter to the XSLT stylesheet XsltArgumentList xsltArgList = new XsltArgumentList(); xsltArgList.AddParam("pmID", "", pmID); xmlItems.TransformArgumentList = xsltArgList;
5
1219
by: | last post by:
I was wondering if there would be any significant performance increases by loading Xslt Files into the Application Variables if there were a single or maybe multiple XSLT file(s) that would be used throughout a website. I do not know if relieving the I/O burden would overcome the memory/hashtable lookup from storing one or multiple XSLT Files in the Application Object.
1
1639
by: John Moore | last post by:
I have a set of code that is called on every page load that loads an xslt file. The xslt file has an embedded <script> tag. Loading the page mutliple times causes aspnet_wp.exe to use all available memory and then reset. As this happens several times over the course of an 8 hour stress run, I'm looking for a solution. The xslt file has the following: <xsl:if test="$strPageCaller=''"> <SCRIPT LANGUAGE="JavaScript">BPB()</SCRIPT>...
3
2011
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as processor input. The basic class hierarchy is:
2
7403
by: Scamjunk | last post by:
I have been desperately looking for a treeview-type solution for my problem for the past three weeks and have been greatly unsuccessful. I am totally new to the world of XSLT and I *don't know* JavaScript. Still, I have managed to get something together, which I am putting across here. Any help (even pointing me to the place to look) is welcome. The problem I have is as follows:
27
2281
by: Chris Tomlinson | last post by:
Hi, is there any way to specify the sequence in which images load on a web page? More specifically, here is what we need to achieve: Image1 starts loading first and the browser does not continue through the HTML until Image1 has loaded COMPLETELY. When Image1 is done, Image2 BEGINS loading. When Image2 is 100% done, only then does Image 3 begin... and so on...
3
9615
by: super.raddish | last post by:
Greetings, I am relatively new to, what I would call, advanced XSLT/XPath and I am after some advice from those in the know. I am attempting to figure out a mechanism within XSLT to compare the difference between two source documents and output node-sets which are "different" (changed or new) to new XML files using xsl:result-document To describe the problem I have provided some example data below along with my a portion of my current...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10018
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.