473,805 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT: Loading Single Image Multiple Times

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 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 12 '05 #1
2 2169
Larry Marburger wrote:
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 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?


Well, I don't see what the problem has to do with XML or XSLT. You are
generating HTML for client browser, right? So whenever there is a
problem in such scenario, first check HTML and make it work properly.
Then make sure XSLT generates exactly HTML document you need.
For thus particular problem I'd play with CACHE-CONTROL META tag in HTML
or better ask in HTML or IE related newsgroup.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2
Larry Marburger wrote:
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 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?


Well, I don't see what the problem has to do with XML or XSLT. You are
generating HTML for client browser, right? So whenever there is a
problem in such scenario, first check HTML and make it work properly.
Then make sure XSLT generates exactly HTML document you need.
For thus particular problem I'd play with CACHE-CONTROL META tag in HTML
or better ask in HTML or IE related newsgroup.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #3

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

Similar topics

6
3339
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
3240
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.
0
346
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
2872
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
1640
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>...
2
7406
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
2284
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
9621
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
9716
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
9596
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
10604
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...
1
10361
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
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
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...
1
4316
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.