Images not cacheing in 2.0?

Discussion in 'ASP .Net' started by roy anderson, Jan 31, 2006.

  1. roy anderson

    roy anderson Guest

    Hey all,
    Thought I had this figured out a week ago, but evidently not. Basically
    when I publish a site in 2.0, the images aren't cacheing?

    For instance, let's say I created a page with a background of 100 tiled
    images (and each image was the exact same file). What SHOULD be
    happening is that when a user loads the page they are sent the image
    just once and it's duplicated 100 times on their end. What IS happening
    is that the image is sent 100 times from the server?!

    Anyone have any insights on what I should be doing here? Is there some
    toggle in VS 2005 I don't know about concerning cacheing? I'm relatively
    new to VS 2005.

    TIA

    *** Sent via Developersdex http://www.developersdex.com ***
    roy anderson, Jan 31, 2006
    #1
    1. Advertising

  2. roy anderson

    Joerg Jooss Guest

    Hello roy,

    > Hey all,
    > Thought I had this figured out a week ago, but evidently not.
    > Basically
    > when I publish a site in 2.0, the images aren't cacheing?
    > For instance, let's say I created a page with a background of 100
    > tiled images (and each image was the exact same file). What SHOULD be
    > happening is that when a user loads the page they are sent the image
    > just once and it's duplicated 100 times on their end. What IS
    > happening is that the image is sent 100 times from the server?!
    >
    > Anyone have any insights on what I should be doing here? Is there some
    > toggle in VS 2005 I don't know about concerning cacheing? I'm
    > relatively new to VS 2005.


    Static content files are not served by the ASP.NET runtime, unless you configure
    IIS to do so. Either these images are marked as non-cacheable, or your client
    is configured to reload them regardless of their cacheability.

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Jan 31, 2006
    #2
    1. Advertising

  3. roy anderson

    Amelyan Guest

    How can one check whether the images are configured as non-cacheable on the
    server?


    "Joerg Jooss" <> wrote in message
    news:...
    > Hello roy,
    >
    >> Hey all,
    >> Thought I had this figured out a week ago, but evidently not.
    >> Basically
    >> when I publish a site in 2.0, the images aren't cacheing?
    >> For instance, let's say I created a page with a background of 100
    >> tiled images (and each image was the exact same file). What SHOULD be
    >> happening is that when a user loads the page they are sent the image
    >> just once and it's duplicated 100 times on their end. What IS
    >> happening is that the image is sent 100 times from the server?!
    >>
    >> Anyone have any insights on what I should be doing here? Is there some
    >> toggle in VS 2005 I don't know about concerning cacheing? I'm
    >> relatively new to VS 2005.

    >
    > Static content files are not served by the ASP.NET runtime, unless you
    > configure IIS to do so. Either these images are marked as non-cacheable,
    > or your client is configured to reload them regardless of their
    > cacheability.
    > Cheers,
    > --
    > Joerg Jooss
    >
    >
    >
    Amelyan, Jan 31, 2006
    #3
  4. roy anderson

    roy anderson Guest

    My question as well. :)
    Thanks for the help Joerg


    From: Amelyan
    How can one check whether the images are configured as non-cacheable on
    the
    server?


    "Joerg Jooss" <> wrote in message
    news:...
    > Hello roy,
    >
    >> Hey all,
    >> Thought I had this figured out a week ago, but evidently not.
    >> Basically
    >> when I publish a site in 2.0, the images aren't cacheing?
    >> For instance, let's say I created a page with a background of 100
    >> tiled images (and each image was the exact same file). What SHOULD be
    >> happening is that when a user loads the page they are sent the image
    >> just once and it's duplicated 100 times on their end. What IS
    >> happening is that the image is sent 100 times from the server?!
    >>
    >> Anyone have any insights on what I should be doing here? Is there

    some
    >> toggle in VS 2005 I don't know about concerning cacheing? I'm
    >> relatively new to VS 2005.

    >
    > Static content files are not served by the ASP.NET runtime, unless you
    > configure IIS to do so. Either these images are marked as

    non-cacheable,
    > or your client is configured to reload them regardless of their
    > cacheability.
    > Cheers,
    > --
    > Joerg Jooss
    >
    >
    >


    *** Sent via Developersdex http://www.developersdex.com ***
    roy anderson, Feb 1, 2006
    #4
  5. roy anderson

    roy anderson Guest

    Jeorg,
    I've set the toggle in IIS to allow cacheing for all ISAPI and ASP apps.
    The kicker here is that the exact same page caches fine when using the
    1.1 framework. The image is just sent once. Make the same page in 2.0
    and the server sends the image everytime. Rather frustrating.
    :(

    *** Sent via Developersdex http://www.developersdex.com ***
    roy anderson, Feb 1, 2006
    #5
  6. roy anderson

    Amelyan Guest

    Roy,

    Did you ever get your image caching issue figure out? I am still having
    trouble with it.

    Thanks,
    -Boris



    "roy anderson" <> wrote in message
    news:...
    > Jeorg,
    > I've set the toggle in IIS to allow cacheing for all ISAPI and ASP apps.
    > The kicker here is that the exact same page caches fine when using the
    > 1.1 framework. The image is just sent once. Make the same page in 2.0
    > and the server sends the image everytime. Rather frustrating.
    > :(
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Amelyan, Feb 1, 2006
    #6
  7. roy anderson

    Joerg Jooss Guest

    Hello roy,

    > My question as well. :)
    > Thanks for the help Joerg
    > From: Amelyan
    > How can one check whether the images are configured as non-cacheable
    > on the server?


    For this kind of analysis it's useful to have a debugging proxy that lets
    you monitor the HTTP traffic. I usually use Fiddler (www.fiddertool.com),
    or browser plug-ins like LiveHttpHeaders. Of course you need to know a bit
    of HTTP to understand what's going on ;-)

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Feb 1, 2006
    #7
  8. roy anderson

    Joerg Jooss Guest

    Hello roy,

    > Jeorg,
    > I've set the toggle in IIS to allow cacheing for all ISAPI and ASP
    > apps.


    I don't think that static image files are affected by this, unless they were
    mapped to an ISAPI extension.

    > The kicker here is that the exact same page caches fine when using the
    > 1.1 framework. The image is just sent once. Make the same page in 2.0
    > and the server sends the image everytime. Rather frustrating.


    Hm... how is that background image file referenced? Within a HTML tag? Within
    a CSS file? Did you compare the IIS configuration for both installatons?

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Feb 1, 2006
    #8
  9. roy anderson

    roy anderson Guest

    Hey Joerg,

    I'm using a CSS file to reference the images like so:
    SPAN, #lblSailDate
    {
    text-align:center;
    border:none 0px;
    background-image:url(images\horizontal_middle.gif);
    background-position:center;
    }

    Insofar as the IIS configuration goes, I've actually created a new page
    in VS 2003 (using 1.1) and a new page in VS 2005 (using 2.0), placed
    them both in new virtual directories on my machine. The only difference
    between the IIS configurations (as far as I can tell) is that one
    utilizes 2.0 and the other 1.1.

    :-/

    *** Sent via Developersdex http://www.developersdex.com ***
    roy anderson, Feb 1, 2006
    #9
    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. J'son
    Replies:
    0
    Views:
    361
    J'son
    Apr 12, 2005
  2. Replies:
    3
    Views:
    851
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 19, 2006
  3. darrel

    Cacheing DB content

    darrel, May 30, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    680
    darrel
    May 30, 2006
  4. Thom Anderson

    Cacheing Business Objects

    Thom Anderson, Nov 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    379
    John Timney \(MVP\)
    Nov 26, 2006
  5. Per Salmi

    TreeView not rendering nodes? Cacheing of a TreeView

    Per Salmi, Oct 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    440
    Steve Drake
    Oct 15, 2003
Loading...

Share This Page