Question about cold fusion

Discussion in 'Programming' started by Melissa, Apr 27, 2006.

  1. #1
    If a site is made with cold fusion does the site have source pages?
     
    Melissa, Apr 27, 2006 IP
  2. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Every site has source pages. ColdFusion pages typically use the extension .cfm.
     
    the_pm, Apr 27, 2006 IP
  3. Melissa

    Melissa Guest

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks, that is what I thought. I have a client that wanted optimization; when I went to his source pages they were blank. I wanted to make sure source pages were the same no matter how the site was created.

    Thanks again.
     
    Melissa, Apr 27, 2006 IP
  4. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Coldfusion sometimes creates a lot of white space. When viewing the source via a browser be sure to scroll down.
     
    woodside, May 1, 2006 IP
  5. ThirdChair

    ThirdChair Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes, ColdFusion it primarily tag based. So, you should see a mix of regular html surrounded by ColdFusion Tags/Functions that serve up the dynamic areas of the site.
     
    ThirdChair, May 3, 2006 IP
  6. ArmchairDeity

    ArmchairDeity Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    "ColdFusion doesn't produce whitespace, programmers do." ;) Yeah, semantics, I know. But seriously, there are bazillions of ways to avoid it, such as:
    
    <cfsetting enablecfoutputonly="true" />
    -- or --
    <cfprocessingdirective suppresswhitespace="true" />
    
    Code (markup):
    Just be sure to put <cfoutput>...</cfoutput> around anything you're writing where you've turned on enablecfoutputonly.

    As for source files, you should see .cfm files on the server and in the browser you'll see www.yadda.com/somedir/index.cfm. The .cfm extension tells you what file you're looking at (aside from frameworks, more on that later), and /somedir tells you which directory to look in off the webroot. In the browser all you'll see is HTML, but in the .cfm file as viewed via FTP in a text editor you'll see CFML. Example, in an imaginary index.cfm file:
    
    <h1>The current date is:</h1>
    <p>
    <cfoutput>#dateFormat(now(),"mm/dd/yyyy")#<cfoutput>
    </p>
    
    Code (markup):
    In the browser you'd see:
    The current date is:

    05/05/2006

    HTH,
    J
     
    ArmchairDeity, May 5, 2006 IP
  7. advantage

    advantage Well-Known Member

    Messages:
    1,338
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    140
    #7
    Even with those directives it still creates the white space for me. I've tried everything and work with several versions of coldfusion.

    The good news is that it does not effect SEO at all.
     
    advantage, Jul 3, 2006 IP
  8. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #8
    you can also place a <cfsilent> around your code in the Application.CFM (Which is generally the cause of the Whitespace in an html document...
     
    ccoonen, Jul 10, 2006 IP