Wouldn't be very hard to reimplement.  it's just a few REreplace() calls,
with some checking in between to see how large the page is at varous points.

You'd have to be careful with the STYLE and SCRIPT replacements however,
because CF does greedy matching.  In other words, the replace he has would
turn this:

   am
   <script></script>
   I
   <script></script>
   Here

into

   am
   Here

Have to do that one manually with a loop, but that's no big deal.  probably
also want to change the comment remover so that if your comment contains a
'>' (like from a tag), it will still delete it.  His version won't.

barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral (formerly PIER System, Inc.)
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com

> -----Original Message-----
> From: Jason Miller [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 4:59 PM
> To: CF-Talk
> Subject: Get text content ratio on the fly from html pages with
> coldfusion
>
>
> Was wondering - I found this - was curious if anyone had seen a
> coldfusion version floating around.. Open source that is...
>
> http://www.holovaty.com/tools/getcontentsize/
>
> It captures the following 4 things from a page you enter into
> their form...
>     1. The size of the page, in bytes (just the HTML page -- no images,
> associated JavaScript or CSS files)
>     2. The size of the page's "text content" (What does that mean?)
>     3. The percentage of the page's weight devoted to text
> content (#1 / #2)
>     4. The page's text content itself
>
>
> thanks,
> jason
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to