Client caching

Discussion in 'ASP .Net' started by Pål Johansen, Aug 6, 2003.

  1. Is it possible to cache portions of a page client side.
    I have som include pages that I would like to store at the clients cache.
    Pål Johansen, Aug 6, 2003
    #1
    1. Advertising

  2. You can cache anything that is normally cached on the client, such as images
    an other binaries, .js files, and cookies.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    Complex things are made up of
    lots of simple things.

    "Pål Johansen" <> wrote in message
    news:%...
    > Is it possible to cache portions of a page client side.
    > I have som include pages that I would like to store at the clients cache.
    >
    >
    Kevin Spencer, Aug 6, 2003
    #2
    1. Advertising

  3. > In a sense, you don't.
    True, and thats the problem.
    It wont cache clock.js either, because after the server prosess that file it
    will just be a part of the whole page.(clock.js is server side include)
    So if one letter changed on the page the client will download all of the
    page over again.(except the cached images) Even though clock.js is
    unchanged.


    But it wont cache
    "Kevin Spencer" <> wrote in message
    news:OwyI%...
    > In a sense, you don't. The browser automatically caches such things. If

    you
    > make a change to the file on the server, the browser will download the
    > latest version.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > http://www.takempis.com
    > Complex things are made up of
    > lots of simple things.
    >
    > "Pål Johansen" <> wrote in message
    > news:...
    > > Yes...but how do I control that.
    > > Take this excample. Lets say I want to client side cache "clock.js" but

    > not
    > > the rest of the page.
    > >
    > > <form action="" method="post" name="clock" id="clock" >
    > > <!--#include file="javaScripts/clock.js" -->
    > > <!--#include virtual="/Mainpages/clock.html-->
    > > </form>
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:%...
    > > > You can cache anything that is normally cached on the client, such as

    > > images
    > > > an other binaries, .js files, and cookies.
    > > >
    > > > --
    > > > HTH,
    > > >
    > > > Kevin Spencer
    > > > Microsoft MVP
    > > > .Net Developer
    > > > http://www.takempis.com
    > > > Complex things are made up of
    > > > lots of simple things.
    > > >
    > > > "Pål Johansen" <> wrote in message
    > > > news:%...
    > > > > Is it possible to cache portions of a page client side.
    > > > > I have som include pages that I would like to store at the clients

    > > cache.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Pål Johansen, Aug 6, 2003
    #3
  4. Thanx alot. Didn't know that.

    "Kevin Spencer" <> wrote in message
    news:...
    > > It wont cache clock.js either, because after the server prosess that

    file
    > it
    > > will just be a part of the whole page.(clock.js is server side include)

    >
    > If you use a server-side include that creates a script tag like the
    > following, only a change in the "clock.js" file would cause the browser to
    > re-download it:
    >
    > <script type="text/javascript" src="clock.js"></script>
    >
    > The reason is that the reference to the.js file is not changed when the

    page
    > it is in changes. It works just like an image tag. Putting an image tag

    into
    > a page that changes doesn't cause the browser to re-download the image

    with
    > every request. It only re-downloads the page.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > http://www.takempis.com
    > Complex things are made up of
    > lots of simple things.
    >
    >
    > "Pål Johansen" <> wrote in message
    > news:...
    > > > In a sense, you don't.

    > > True, and thats the problem.
    > > It wont cache clock.js either, because after the server prosess that

    file
    > it
    > > will just be a part of the whole page.(clock.js is server side include)
    > > So if one letter changed on the page the client will download all of the
    > > page over again.(except the cached images) Even though clock.js is
    > > unchanged.
    > >
    > >
    > > But it wont cache
    > > "Kevin Spencer" <> wrote in message
    > > news:OwyI%...
    > > > In a sense, you don't. The browser automatically caches such things.

    If
    > > you
    > > > make a change to the file on the server, the browser will download the
    > > > latest version.
    > > >
    > > > --
    > > > HTH,
    > > >
    > > > Kevin Spencer
    > > > Microsoft MVP
    > > > .Net Developer
    > > > http://www.takempis.com
    > > > Complex things are made up of
    > > > lots of simple things.
    > > >
    > > > "Pål Johansen" <> wrote in message
    > > > news:...
    > > > > Yes...but how do I control that.
    > > > > Take this excample. Lets say I want to client side cache "clock.js"

    > but
    > > > not
    > > > > the rest of the page.
    > > > >
    > > > > <form action="" method="post" name="clock" id="clock" >
    > > > > <!--#include file="javaScripts/clock.js" -->
    > > > > <!--#include virtual="/Mainpages/clock.html-->
    > > > > </form>
    > > > >
    > > > > "Kevin Spencer" <> wrote in message
    > > > > news:%...
    > > > > > You can cache anything that is normally cached on the client, such

    > as
    > > > > images
    > > > > > an other binaries, .js files, and cookies.
    > > > > >
    > > > > > --
    > > > > > HTH,
    > > > > >
    > > > > > Kevin Spencer
    > > > > > Microsoft MVP
    > > > > > .Net Developer
    > > > > > http://www.takempis.com
    > > > > > Complex things are made up of
    > > > > > lots of simple things.
    > > > > >
    > > > > > "Pål Johansen" <> wrote in message
    > > > > > news:%...
    > > > > > > Is it possible to cache portions of a page client side.
    > > > > > > I have som include pages that I would like to store at the

    clients
    > > > > cache.
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Pål Johansen, Aug 6, 2003
    #4
    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. John Livermore

    stopping client side caching

    John Livermore, Jul 15, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    413
    Marc Hoeppner
    Jul 15, 2003
  2. Hypo
    Replies:
    6
    Views:
    406
  3. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    783
    Troy Simpson
    Jan 19, 2004
  4. JimLad
    Replies:
    3
    Views:
    911
    JimLad
    Jan 21, 2010
  5. A.M-SG
    Replies:
    2
    Views:
    390
    Steven Cheng[MSFT]
    Nov 2, 2005
Loading...

Share This Page