3 ms·
I use Smarty as a templating engine and sometimes I have to generate a few lines of javascript or css dynamically on the page based on php variables at runtime.
by byoung2 16y ago
I use Smarty as a templating engine and sometimes I have to generate a few lines of javascript or css dynamically on the page based on php variables at runtime. I wouldn't want these to be stripped out and cached.
Usually I do a lot of optimization in the templates. For example, Smarty lets you wrap your output in {strip} tags to remove whitespace and newlines. And I have a script to concatenate and minify javascript and css. Plus mod_deflate on the server. I serve images from s3/cloudfront and there is a script that will use smush.it to compress everything in an s3 folder and set the expires tags.