View Single Post
  #1  
Old 06-04-2004, 09:40 PM
 
Adian009 Adian009 is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Tiverton, RI, USA
Posts: 37
 

Default Smarty.php Mod to Remove all UN-NECESSARY White Space

Smarty has an included filter that you can implement quite simply by adding one line of code to your SMARTY.PHP file.

Add the following line to the file just below the ImagesDir and SkinDir assign statements near the end:

Code:
$smarty->load_filter("output","trimwhitespace");

It safely removes all whitespace from the generated HTML just prior to sending the page to the client - increases speed dramatically by reducing the overall size of the file. It works great and you will have no more un-necessary blank lines or spaces.

Check it out before and after by using View, Source in your browser on any X-Cart page - the difference is easily noticable.

Al Ponte
__________________
---------------------------------------------
Infosolv, LLC
A Professional Services Company
X-Cart v3.5.10 & 4.01
Find our MOD\'s at: Custom X-Cart MOD\'s, Add-On\'s & X-Cart Hosting!
Reply With Quote