| Author | 
  | 
shaggy
 
  
  Joined: 15 Nov 2005 Posts: 82 Location: Dundee, Michigan
  | 
 Posted: Wed 08 Mar '06 0:37    Post subject: mod_tidy wow what a difference. faster loading pages + trick | 
     | 
 
  | 
 
My pages load up faster now.  Ok u may download mod_tidy from http://tidy.sourceforge.net/ for windows.  Binary.
 
 
U can also use this as a quick reference: 
 
 	  | Code: | 	 		  # Default configuration for mod_tidy
 
#
 
# To run mod_tidy you have to include this file into the Apache2 configuration.
 
#
 
 
# Add to your httpd.conf
 
<IfModule !tidy_module>
 
    LoadModule tidy_module modules/mod_tidy.so
 
</IfModule>
 
 
# Add to your httpd.conf or your VirtualHost
 
<IfModule tidy_module>
 
    # Run all HTML and XHTML through mod_tidy
 
    AddOutputFilterByType TIDY text/html application/xhtml+xml
 
 
    # Tidy Options
 
    # (see also Tidy's Quick Reference on http://tidy.sourceforge.net/docs/quickref.html)
 
    TidyOption accessibility-check 3
 
    TidyOption add-xml-decl yes
 
    TidyOption char-encoding utf8
 
    TidyOption enclose-text yes
 
    TidyOption indent auto
 
    TidyOption logical-emphasis yes    
 
    TidyOption output-xhtml yes
 
    TidyOption wrap 0
 
    TidyOption doctype strict
 
</IfModule>
 
 | 	  
 
 
WARNING!!! If u use this on a phpbb board u will GET ERRORS once you restart your server.
 
 
Leave all the TidyOption ...... alone.  Here is how to fix that.  Where it says 
 
 	  | Code: | 	 		  | application/xhtml+xml | 	  
 
Delete it.  
 
 
Trick Now scoll up in your httpd.conf file to where u added all of your AddType application/x-...... Highlight that and copy it.  Now scroll back down to where you added mod_tidy if module.  And where you just deleted the  	  | Code: | 	 		  | application/xhtml+xml | 	   Paste.  Poof your set.  Restart the server and your pages will load up faster. | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7443 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Wed 08 Mar '06 13:08    Post subject:  | 
     | 
 
  | 
 
| How did you make the benchmark? | 
 
  | 
| Back to top | 
 | 
shaggy
 
  
  Joined: 15 Nov 2005 Posts: 82 Location: Dundee, Michigan
  | 
 Posted: Wed 08 Mar '06 19:00    Post subject:  | 
     | 
 
  | 
 
 	  | James Blond wrote: | 	 		  | How did you make the benchmark? | 	  
 
Benchmark what?  I tested this with my intranet message board a phpBB board | 
 
  | 
| Back to top | 
 | 
pnllan
 
 
  Joined: 05 Dec 2005 Posts: 221
 
  | 
 Posted: Wed 08 Mar '06 19:37    Post subject:  | 
     | 
 
  | 
 
James brings up a good point.  You say it is faster, but is it really?
 
 
Hence, the question about benchmarking.  A benchmark comparsion would show the difference between running without the MOD and running with the MOD.
 
. | 
 
  | 
| Back to top | 
 | 
admin Site Admin
  
  Joined: 15 Oct 2005 Posts: 706
 
  | 
 Posted: Wed 08 Mar '06 20:00    Post subject:  | 
     | 
 
  | 
 
I think, I miss some here or I do not understand. Mod_tidy is a TidyLib based DSO module for the Apache  to parse, clean-up and pretty-print the webservers' (X)HTML output.
 
 
So it should not speed-up things, instead every request consumes more cycles. | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7443 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Wed 08 Mar '06 21:55    Post subject:  | 
     | 
 
  | 
 
For real benchmark put this code into the pages
 
 
at the very start put 
 
 	  | Code: | 	 		  
 
echo 'Start:  '.$start=mktime()."\n";
 
 | 	  
 
 
at the very end
 
 	  | Code: | 	 		  
 
echo 'Finish: '.$finish=mktime()."\n"; 
 
echo 'Result: '.$result=$finish-$start." sekunden\n"; 
 
 | 	  
 
 
Tell me if with mod_tidy it is faster. I don't think so. | 
 
  | 
| Back to top | 
 |