Client caching

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pål Johansen

    #1

    Client caching

    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

    #2
    Re: Client caching

    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
    All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

    Complex things are made up of
    lots of simple things.

    "Pål Johansen" <mummiez@hotmai l.com> wrote in message
    news:%23rvsH6AX DHA.2648@TK2MSF TNGP09.phx.gbl. ..[color=blue]
    > 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.
    >
    >[/color]


    Comment

    • Pål Johansen

      #3
      Re: Client caching

      > 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" <kevin@takempis .com> wrote in message
      news:OwyI%23LCX DHA.1492@TK2MSF TNGP12.phx.gbl. ..[color=blue]
      > In a sense, you don't. The browser automatically caches such things. If[/color]
      you[color=blue]
      > 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" <mummiez@hotmai l.com> wrote in message
      > news:es7wUlBXDH A.2476@tk2msftn gp13.phx.gbl...[color=green]
      > > Yes...but how do I control that.
      > > Take this excample. Lets say I want to client side cache "clock.js" but[/color]
      > not[color=green]
      > > the rest of the page.
      > >
      > > <form action="" method="post" name="clock" id="clock" >
      > > <!--#include file="javaScrip ts/clock.js" -->
      > > <!--#include virtual="/Mainpages/clock.html-->
      > > </form>
      > >
      > > "Kevin Spencer" <kevin@takempis .com> wrote in message
      > > news:%23Pe1ESBX DHA.1480@tk2msf tngp13.phx.gbl. ..[color=darkred]
      > > > You can cache anything that is normally cached on the client, such as[/color]
      > > images[color=darkred]
      > > > 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" <mummiez@hotmai l.com> wrote in message
      > > > news:%23rvsH6AX DHA.2648@TK2MSF TNGP09.phx.gbl. ..
      > > > > 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[/color]
      > > cache.[color=darkred]
      > > > >
      > > > >
      > > >
      > > >[/color]
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Pål Johansen

        #4
        Re: Client caching

        Thanx alot. Didn't know that.

        "Kevin Spencer" <kevin@takempis .com> wrote in message
        news:uC6HyDEXDH A.1640@TK2MSFTN GP10.phx.gbl...[color=blue][color=green]
        > > It wont cache clock.js either, because after the server prosess that[/color][/color]
        file[color=blue]
        > it[color=green]
        > > will just be a part of the whole page.(clock.js is server side include)[/color]
        >
        > 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[/color]
        page[color=blue]
        > it is in changes. It works just like an image tag. Putting an image tag[/color]
        into[color=blue]
        > a page that changes doesn't cause the browser to re-download the image[/color]
        with[color=blue]
        > 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" <mummiez@hotmai l.com> wrote in message
        > news:eOXVxiDXDH A.208@tk2msftng p13.phx.gbl...[color=green][color=darkred]
        > > > In a sense, you don't.[/color]
        > > True, and thats the problem.
        > > It wont cache clock.js either, because after the server prosess that[/color][/color]
        file[color=blue]
        > it[color=green]
        > > 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" <kevin@takempis .com> wrote in message
        > > news:OwyI%23LCX DHA.1492@TK2MSF TNGP12.phx.gbl. ..[color=darkred]
        > > > In a sense, you don't. The browser automatically caches such things.[/color][/color][/color]
        If[color=blue][color=green]
        > > you[color=darkred]
        > > > 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" <mummiez@hotmai l.com> wrote in message
        > > > news:es7wUlBXDH A.2476@tk2msftn gp13.phx.gbl...
        > > > > Yes...but how do I control that.
        > > > > Take this excample. Lets say I want to client side cache "clock.js"[/color][/color]
        > but[color=green][color=darkred]
        > > > not
        > > > > the rest of the page.
        > > > >
        > > > > <form action="" method="post" name="clock" id="clock" >
        > > > > <!--#include file="javaScrip ts/clock.js" -->
        > > > > <!--#include virtual="/Mainpages/clock.html-->
        > > > > </form>
        > > > >
        > > > > "Kevin Spencer" <kevin@takempis .com> wrote in message
        > > > > news:%23Pe1ESBX DHA.1480@tk2msf tngp13.phx.gbl. ..
        > > > > > You can cache anything that is normally cached on the client, such[/color][/color]
        > as[color=green][color=darkred]
        > > > > 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" <mummiez@hotmai l.com> wrote in message
        > > > > > news:%23rvsH6AX DHA.2648@TK2MSF TNGP09.phx.gbl. ..
        > > > > > > Is it possible to cache portions of a page client side.
        > > > > > > I have som include pages that I would like to store at the[/color][/color][/color]
        clients[color=blue][color=green][color=darkred]
        > > > > cache.
        > > > > > >
        > > > > > >
        > > > > >
        > > > > >
        > > > >
        > > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...