The FinancialContent Network     SocialPicks Community   |   MarketMinute Monitor   |   MarketMinute Market Updates   |   MarketMinute Stock News
SocialPicks
   Sign Up   |   Log In   |   What is SocialPicks?     

Halve your site's page sizes in 5 minutes

 Apr 28, 2009 06:39 PM UTC
X1piuxx1vymtqtyfiu50x-rtkknjre2iobelalogd0k0s5ddytbdwcrzieb3h9c8dukcv8smcahnulc7mrpgcloig95xozfgpj0kbdxryqzr0a
Return Risk
-10.68% HIGH
Sr. Analyst

Graphic_arrow1 Via Evan Reiser's Blog:  

This reduces our page sizes by up to 50%+

from django.utils.html import strip_spaces_between_tags
from django.conf import settings

class SpacelessMiddleware(object):
def process_response(self, request, response):
if not settings.DEBUG:
if 'text/html' in response['Content-Type']:
response.content = strip_spaces_between_tags(response.content)
return response


 Graphic_website1 Read the rest of original post »



Add Comment

Be the first to comment on this story and earn 2 points.

Your Comment



IN THE PRESS
Press_forbes Press_washingtonpost Press_wsj Press_npr Press_techcrunch