Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[optimization] stript whitespaces from template #46

Open
DarkDimius opened this issue May 28, 2012 · 2 comments
Open

[optimization] stript whitespaces from template #46

DarkDimius opened this issue May 28, 2012 · 2 comments

Comments

@DarkDimius
Copy link

First of all, I would like to thank you for such a great project!

I've got idea for small improvement: currently html produced by templates contains all whitespaces that where present in template, making it 2-3 times bigger than actual content. Idea is to introduce configuration option that will strip those whitespaces.

Removing them from template source is not an option as they are used as part of code stile, and sometimes simplify debug process, but in our production environment we have no way to compress traffic and thus 60% of our traffic are whitespaces.

This could be done in compile phase in prod mode, or just controlled by configuration option.

@branaway
Copy link
Owner

Hi thanks for the comment. I'll take a look at it.

@branaway
Copy link
Owner

I can embed an html compressor in japid, such as http://code.google.com/p/htmlcompressor/. But I'm a little curious why white space takes so much space in the output in your cases. Usually it takes additional 20 percent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants