Compacting/minifying dynamic html

前端 未结 6 1142
梦如初夏
梦如初夏 2021-01-04 12:21

I am using django templating, and for readability I have html that looks similar to the following:

{% if some_variable %}
    text
{% else %}
    nothing exi         


        
6条回答
  •  梦毁少年i
    2021-01-04 12:32

    If you're using with Nginx its Strip module is doing really great job with cleaning the html for you. It's real time and transparent. You don't need to care about at all after you set it up correctly.

    http://wiki.nginx.org/HttpStripModule

提交回复
热议问题