Professional Web Applications Themes

why use cfcontent? - Coldfusion - Getting Started

Why would one use cfcontent insead of of using cfheader? Sorry if this eems like a daft question but they seem to be the same thing to me....

Sponsored Links
  1. #1

    Default why use cfcontent?

    Why would one use cfcontent insead of of using cfheader? Sorry if this eems
    like a daft question but they seem to be the same thing to me.


    Sponsored Links
    Darren Guest

  2. #2

    Default Re: why use cfcontent?

    On 2005-05-08 06:15:14 -0500, "Darren" <campagvianet.net.au> said:
    > Why would one use cfcontent insead of of using cfheader? Sorry if this
    > eems like a daft question but they seem to be the same thing to me.
    Actually they serve two different purposes. cfcontent is used to
    deliver non-HTML content to the user's browser, so you can do things
    like send down a Word doent when someone hits a CF page. cfheader
    is simply used to set various HTML headers.

    One great use of cfcontent is to be able to put things like Word
    doents, PDFs, etc. outside your web root so they are not directly
    accessible via a URL, but use cfcontent to deliver these doents to
    the user. This allows you to easily control access to doents by
    using CF since CF can grab doents from anywhere on the server's
    drive.

    Matt
    --
    Matt Woodward
    [email]mpwoodward[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  3. #3

    Default Re: why use cfcontent?

    I see - is it not an overlap a little bit as MIME type is set using headers?

    But what you say is that cfcontent can do many additional things -is more
    powerful.

    thank you for such speed in replying.

    "mpwoodward *TMM*" <mpwoodward> wrote in message
    news:d5l1sr$20$3forums.macromedia.com...
    > On 2005-05-08 06:15:14 -0500, "Darren" <campagvianet.net.au> said:
    >
    >> Why would one use cfcontent insead of of using cfheader? Sorry if this
    >> eems like a daft question but they seem to be the same thing to me.
    >
    > Actually they serve two different purposes. cfcontent is used to deliver
    > non-HTML content to the user's browser, so you can do things like send
    > down a Word doent when someone hits a CF page. cfheader is simply used
    > to set various HTML headers.
    >
    > One great use of cfcontent is to be able to put things like Word
    > doents, PDFs, etc. outside your web root so they are not directly
    > accessible via a URL, but use cfcontent to deliver these doents to the
    > user. This allows you to easily control access to doents by using CF
    > since CF can grab doents from anywhere on the server's drive.
    >
    > Matt
    > --
    > Matt Woodward
    > [email]mpwoodward[/email]
    > Team Macromedia - ColdFusion
    >

    Darren Guest

Similar Threads

  1. FLV and cfcontent
    By rbondick in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: August 7th, 09:09 PM
  2. cfcontent - help please
    By quiero mas in forum Coldfusion Database Access
    Replies: 2
    Last Post: March 24th, 12:32 AM
  3. CFCONTENT
    By nix4 in forum Coldfusion - Getting Started
    Replies: 8
    Last Post: July 15th, 03:43 PM
  4. CFcontent and zip files
    By Ebbey in forum Macromedia ColdFusion
    Replies: 6
    Last Post: April 1st, 02:10 PM
  5. CFCONTENT and SSL
    By cmschofield in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: March 2nd, 05:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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