<cfheader> for preventing caching of pages

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default <cfheader> for preventing caching of pages

    What is the point of using <cfheader> to effectively force the browser
    not to cache any pages so that they reload from the server? I've put the
    following:

    <cfheader name="Expires" value="#GetHttpTimeString(Now())#">
    <cfheader name="Pragma" value="no-cache">

    in my Application page for this wizard. Using the wizard Back button
    even with these headers brings up the previous page with the field
    values filled in just as they were when I moved to the next step. These
    headers are supposed to expire a posted page when the Back button is
    used, thereby causing the page to be reloaded from the server. This
    information, therefore, should not be filled in.

    Am I using these tags incorrectly?

    BTW, this was tested in both IE6 and Firefox.

    Thanks,
    TWR
    thetawaverider Guest

  2. Similar Questions and Discussions

    1. Preventing page breaks in PDF on converted web pages
      I've been happy with the speed and linking that is available when I convert web pages into pdf's. However, the pdf versions often break the pages at...
    2. swf streaming or preventing caching
      Folks I have swf files generated from Captivate - I want to stream these to prevent browser caching and conceal original file location Can...
    3. Server caching pages
      I'm running CFMX 6.1 on win2003/IIS6. I'm having a lot of trouble at the moment with the server caching the pages when not told to. Trusted cache is...
    4. Pages are caching somehow....HELP!!!!
      I have an intranet where I am running a survey. Very simplified, user's information is pulled from the session information and automatically put...
    5. Lockdown tool preventing view of .asp pages?
      Hello, I am trying access a virtual directory I set-up through IIS and my web pages are built on asp. I also ran the IIS Lockdown tool on the...
  3. #2

    Default Re: <cfheader> for preventing caching of pages

    I could be wrong here, but I thought these tags would NOT work with the back
    button, but only with actual requests to the server. The back button is at
    the mercy of the user as they can opt to use a local cache.





    "thetawaverider" <thetawaverider@gmail.com> wrote in message
    news:d0fj4v$pi$2@forums.macromedia.com...
    > What is the point of using <cfheader> to effectively force the browser not
    > to cache any pages so that they reload from the server? I've put the
    > following:
    >
    > <cfheader name="Expires" value="#GetHttpTimeString(Now())#">
    > <cfheader name="Pragma" value="no-cache">
    >
    > in my Application page for this wizard. Using the wizard Back button even
    > with these headers brings up the previous page with the field values
    > filled in just as they were when I moved to the next step. These headers
    > are supposed to expire a posted page when the Back button is used, thereby
    > causing the page to be reloaded from the server. This information,
    > therefore, should not be filled in.
    >
    > Am I using these tags incorrectly?
    >
    > BTW, this was tested in both IE6 and Firefox.
    >
    > Thanks,
    > TWR

    gumshoe Guest

  4. #3

    Default Re: <cfheader> for preventing caching of pages

    This seems to work for me....



    <cfoutput>
    <cfheader name="expires" value="#now()#">
    <cfheader name="pragma" value="no-cache">
    <cfheader name="cache-control" value="no-cache, no-store, must-revalidate">
    </cfoutput>

    paross1 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139