How to not cache all elements of a web page download?

Discussion in 'ASP General' started by Ron Lessnick, Feb 2, 2005.

  1. Ron Lessnick

    Ron Lessnick Guest

    I have to continuously download the same web page on our IIS server. It is
    important to always download a fresh page from the server including not only
    the .asp page itself but all the .gif and .jpg files associated with that
    page. We need to measure statistical info on how long it takes to download.
    If the page is stored in the client machines internet cache that would be a
    problem.
    Now I know how to add the following to the main .asp page to insure a fresh
    copy is always downloaded of this page itself.
    <% Response.Expires = -2000 %>

    When I look at the client machines cache folder it does show that the main
    ..asp page has expired an hour ago. However
    all the .gifs and .jpgs , etc downloaded with the main .aps page show the
    value Expire: None which I conclude means that these pieces are not
    redownload each time we get the main .asp page.

    Up till now we have been using a perl script to try and erase the cache
    before each download . This works sometimes but not all the time.

    Is there any way to force the .gifs, .jpgs etc. to have to download fresh
    each time just like I was able to get the main .asp page to redownload with
    <% Response.Expires = -2000 %>

    TIA
    Ron
     
    Ron Lessnick, Feb 2, 2005
    #1
    1. Advertising

  2. Ron Lessnick

    [MSFT] Guest

    If your images on the ASP page need updated everytime, you may not use a
    static url link to a image. Instead, you may use a link to a ASP page which
    read image file on server side and write binary data to Response. This can
    force it refresh everytime.

    Luke
     
    [MSFT], Feb 3, 2005
    #2
    1. Advertising

  3. Ron Lessnick

    Ron Lessnick Guest

    Thanks for the replies.

    I used Curt's Method and it works fine.

    i.e.; <IMG height=110
    src="CNET_com_files/2ghz.gif?<%=someRandomNumberVarible%>" width=85

    "[MSFT]" <> wrote in message
    news:D...
    > If your images on the ASP page need updated everytime, you may not use a
    > static url link to a image. Instead, you may use a link to a ASP page

    which
    > read image file on server side and write binary data to Response. This can
    > force it refresh everytime.
    >
    > Luke
    >
     
    Ron Lessnick, Feb 4, 2005
    #3
    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. DesignerX

    Page.Cache vs HttpContext.Current.Cache

    DesignerX, Jan 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,292
    vMike
    Jan 20, 2004
  2. Gerald Aichholzer
    Replies:
    2
    Views:
    2,559
    Gerald Aichholzer
    Jun 27, 2006
  3. John
    Replies:
    2
    Views:
    1,194
  4. Replies:
    1
    Views:
    130
  5. Replies:
    4
    Views:
    194
Loading...

Share This Page