Friday, January 10, 2014

cfprocessingdirective

For years we have been using the tag cfprocessingdirective Tag at the top of our templates like this.

<cfprocessingdirective suppresswhitespace="yes" pageencoding="utf-8">

Then one of our colleagues found this in the Adobe Docs

"The cfprocssingdirective tag has limitations that depend on the attribute you use. For this reason, Adobe recommends that you include either the pageencoding or suppresswhitespace attribute in a cfprocessingdirective tag, not both." 

Ah hah. Afterwards we began to modify the templates.

<cfprocessingdirective pageEncoding="utf-8" />
<cfprocessingdirective suppressWhitespace="true">
...[some code]
</cfprocessingdirective>

It struck me however after playing around with the tag that the suppressWhitespace attribute did not seem to have an effect on the white space emitted. The white space was being stripped out regardless whether the tag was present or not. A quick check showed me that the "Enable Whitespace Management" Option on the server was active.

Thus it appears this setting essentially replicates at the page level the global setting for Whitespace Management.

4 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Love it! Very interesting topics, I hope the incoming comments and suggestion are equally positive. Thank you for sharing this information that is actually helpful.


    ufgop.org
    ufgop.org

    ReplyDelete
  3. Good day. I was very impressed with your wonderful article. I hope you can write more and inspire a lot of people . You can also visit my site if you have time. Thank you and Bless you always.

    triciajoy.com

    www.triciajoy.com

    ReplyDelete

  4. Your blog is so cute and I love it. Keep it up.Happy blogging. :)

    Bubble
    www.gofastek.com

    ReplyDelete