Force reload of changed page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nige

    #1

    Force reload of changed page?

    I'm not sure if this is the right group, but I thought the solution may
    be JS related, hence my post.

    I've got a web site that is frequently updated; yesterday several
    subscribers contacted me to say they couldn't see the update. I suspect
    this is a cache problem, so is there a way to force a page to be
    reloaded when it is changed. I realize it is too late for the current
    pages, but I'd like to include something later.


    --
    Nige

    Please replace YYYY with the current year
    ille quis mortem cum maximus ludos, vincat
  • Stuart Palmer

    #2
    Re: Force reload of changed page?

    Nige,
    Don't think this is a JS question really, always useful to use search
    engines to see if you can find the answer first. But try:-

    <META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">

    it may help. Otherwise I know you can defo do it server side with asp
    using:-

    response.expire s = 0

    Hope that helps

    Stu


    "Nige" <uYYYY@ntlworld .com> wrote in message
    news:7vb9rvk7ri ri6enjkhn064vr6 r89ltb0ic@4ax.c om...[color=blue]
    > I'm not sure if this is the right group, but I thought the solution may
    > be JS related, hence my post.
    >
    > I've got a web site that is frequently updated; yesterday several
    > subscribers contacted me to say they couldn't see the update. I suspect
    > this is a cache problem, so is there a way to force a page to be
    > reloaded when it is changed. I realize it is too late for the current
    > pages, but I'd like to include something later.
    >
    >
    > --
    > Nige
    >
    > Please replace YYYY with the current year
    > ille quis mortem cum maximus ludos, vincat[/color]


    Comment

    • Nige

      #3
      Re: Force reload of changed page?

      In comp.lang.javas cript, Stuart Palmer wrote:
      [color=blue]
      ><META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
      ><META HTTP-EQUIV="Pragma" CONTENT="no-cache">[/color]

      Thanks, but I didn't really explain properly. I want to make sure that
      my web content is reasonably current, but at the same time I don't want
      to bypass caching completely.

      I'm looking for a way to cache a page for 24 hours after a user accesses
      it, but if they come back after that time, then reload the page.

      I understand using HTTP headers, rather than META tags, is the best way
      for maximum compatibility.

      I've seen a few scripts in something called PHP, but I don't think I can
      use this on my site.

      Can anyone help, or offer an alternative?


      --
      Nige
      --
      Nige

      Please replace YYYY with the current year
      ille quis mortem cum maximus ludos, vincat

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Force reload of changed page?

        Nige wrote:
        [color=blue]
        > In comp.lang.javas cript, Stuart Palmer wrote:[color=green]
        >><META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
        >><META HTTP-EQUIV="Pragma" CONTENT="no-cache">[/color]
        >
        > Thanks, but I didn't really explain properly. I want to make sure that
        > my web content is reasonably current, but at the same time I don't want
        > to bypass caching completely.[/color]

        "Wash it but don't make it wet." ;-)
        [color=blue]
        > I'm looking for a way to cache a page for 24 hours after a user accesses
        > it, but if they come back after that time, then reload the page.[/color]

        Only server-side scripting can provide that reliably. You need the script
        to set the Expires HTTP header and the `meta' element according to the
        current date, i.e. the date the user accesses the document.


        PointedEars

        Comment

        Working...