XSLT: Loading Single Image Multiple Times

Discussion in 'ASP .Net' started by Larry Marburger, Jun 21, 2004.

  1. 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?
     
    Larry Marburger, Jun 21, 2004
    #1
    1. Advertising

  2. Larry Marburger

    Teemu Keiski Guest

    Re: Loading Single Image Multiple Times

    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" <> wrote in message
    news:vJDBc.67250$...
    > 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?
    >
     
    Teemu Keiski, Jun 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    516
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. Todd
    Replies:
    5
    Views:
    1,028
    Roedy Green
    Aug 23, 2007
  3. Jack Steven
    Replies:
    2
    Views:
    444
    Chris Rebert
    Mar 9, 2009
  4. mseele
    Replies:
    1
    Views:
    107
    Dr.Ruud
    Aug 1, 2008
  5. edfialk
    Replies:
    0
    Views:
    188
    edfialk
    May 10, 2007
Loading...

Share This Page