Oh, and if you haven't already, install the YSlow and Pagespeed addons for
Firefox to analyze your pages. Their feedback can  get you to the heart of
any client side problems very quickly.

Server side, I wouldn't be so concerned by the whitespace and more concerned
by slow running queries and code.

Dominic

2009/11/4 Jeff Gladnick <[email protected]>

>
> We have a VERY high traffic website, and we're trying to speed up the
> pageload times a bit.  One of the things we're considering is going through
> some of the cfm files that are loaded on every request and trying to strip
> them down:
>
> So for example, on the page that builds the <html> tag @ the top, we have:
> --------------
> <cfoutput><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head></cfoutput>
>        <cfif request.showIntroAd>
>                <cfoutput><meta http-equiv="refresh"
> content="#request.site.introAdDisplayTime#;http://
> #CGI.HTTP_HOST##request.loader.geturi(request.object.id,request.page)#<cfif
> CGI.query_string neq "">?#CGI.QUERY_STRING#</cfif>">
>                </cfoutput>
>        </cfif>
>        <cfoutput><meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
>        <meta http-equiv="Pragma" content="no-cache" />
>        <meta http-equiv="Expires" content="-1" />
>        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
>        <link rel="icon" href="/favicon.ico" type="image/x-icon" />
>        </cfoutput>
>        <cfif (isDefined("request.isHomePage") AND request.isHomePage) or
> cgi.path_info eq "/">
>                <!--- GOOGLE SPIDER ACTIVITY DIAGNOSTIC TAG --->
>                <cfoutput><META name="verify-v1"
> content="rlf8D2GawTNaQTdKz2jo3t+cM5Bg+vVz3C7+uoCtYy4=" />
>                </cfoutput>
>        </cfif>
>
>        <cfoutput>
>        <script type="text/javascript" src="/scripts/functions.js"></script>
>        </cfoutput>
> -------------------
>
> Lots of white space in there.
>
> On some other high traffic sites I see HTML compressed into a single line
> of code.  How can we do that reliably while still making the code readable
> by developers.
>
> One thing we considered was to wrap blocks in cfsavecontent, and then use
> regex to strip out the tabs/linebreaks/etc, and save the blocks of code into
> the application scope.
>
> We are already Gzipping files.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328039
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to