| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Smarty.php Mod to Remove all UN-NECESSARY White Space | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Measuring Impact of This
Does anyone have any ideas or interest in measuring the impact of triming the whitespaces?
Personally, I do - the only way I can think of to measure it would be to create a script that accesses specific pages in succession. Run the script with whitespaces then trimming them and compare the average Bandwidth and Response time. Anyone have any other ideas? I am working full-time at a client site who is a large ASP so we I have access to sophisticated web testing/stress testing software...just don't know what to test. --al
__________________
--------------------------------------------- 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! |
|||||||
#12
|
|||||||||
|
|||||||||
Quote:
What the addition to Smarty will do is change this: Code:
To this: Code:
It is not going to strip out the \n commands (New Line) like the {strip} tag does. So, it is not going to shove all the email data on one line. As for measuring impact, that is easy. If you strip out the extra blank lines from an HTML file, then you decrease file size, thus making the download time of the HTML shorter. |
|||||||||
#13
|
|||||||||
|
|||||||||
So is this safe to use?
I am running 3.4.14 and most of my invoice templates are in html. I've tried following this thread but the concensus isn't clear to me. |
|||||||||
#14
|
|||||||||
|
|||||||||
So I just went and added it in. Haven't tested my invoices yet, but this is like VIAGRA for your store. Big time.
|
|||||||||
#15
|
|||||||||
|
|||||||||
UPDATE.
Still working great EXCEPT it isn't playing nice with my plain text emails. Particularily the company signature and the order template. All of the blank lines between product details are gone and the products have no spaces between them. example Quote:
Should look like Quote:
and my email sig is just one run on line. |
|||||||||
#16
|
|||||||
|
|||||||
Quote:
You ain't kidding Thanks for the tip Adian009
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#17
|
|||||||||
|
|||||||||
Will this work for Smarty-2.5.0 ?
|
|||||||||
#18
|
|||||||
|
|||||||
Quote:
Yes, that is what I have and it works!
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#19
|
|||||||||
|
|||||||||
If I enclose my email tpls in {literal} tags should I be ok?
|
|||||||||
#20
|
|||||||
|
|||||||
Well, here is what i get:
If i enclose my plain text email *.tpl in {strip}{/strip} the result is printed out in one line. Enclosing email in {literal}{/literal} don't parse code and just prints it out all code included between {literal} hmm |
|||||||
|
|||
X-Cart forums © 2001-2020
|