[thelist] CF Tip: Debugging and Validating

Frank frank at loofahcom.com
Wed Nov 14 02:16:15 CST 2001


When a site's about to go live I usually check the validity of the HTML and 
CSS of my pages, to snare any bugs that might have crept in, or to verify 
that the output of the calculations turn out nicely. In order to save a 
little time and energy, I add the following to the bottom of my templates. 
No muss, no fuss, it's easy. Watch the wrap!


<!--- HTML and CSS validation: Comment when done. (Drag the end of this 
comment to the end of the block) --->
<cfset 
theURI="http://#cgi.server_name##cgi.script_name##IIF(Len(cgi.query_string), 
DE('?'&cgi.query_string), DE(''))#">

<!--- Display the links --->
<p>
    <strong>Please leave this until the site is live, then comment 
out.</strong><br>
    <cfoutput>
       The URI to check is: #TheURI#<br>
       <a href="http://validator.w3.org/check?uri=#TheURI#">Validate 
HTML</a><br>
       <a 
href="http://jigsaw.w3.org/css-validator/validator?uri=#TheURI#">Validate 
CSS</a>
    </cfoutput>
</p>





More information about the thelist mailing list