2
1

Hello Guys,

I was trying to use GZip for Django. I've simply removed the comment hash from the GZip line on settings.py.

I noticed that my javascript is not beeing compressed. I've checked the meta.osqa response, and it does compress the javascript.

What do I have to do configure django to compress my javascript files?

Best regards,
Gallahar

asked 29 Jun '10, 23:15

Gallahar's gravatar image

Gallahar
27561414
accept rate: 0%

Aside: How do you actually determine what is and isn't being compressed?

(30 Jun '10, 01:48) Joseph

We don't use django, but rather apache. Django will work if, you're loading the files with it, but I'm guessing that your images and js are being server directly by apache. We use this two lines in the vhost file:

SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/rss+xml application/x-javascript application/atom_xml application/javascript

Joseph, you know if some file has been compressed by looking at thr Content-Encoding in the response header.

link

answered 30 Jun '10, 06:14

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14
×7
×1

Asked: 29 Jun '10, 23:15

Seen: 1,048 times

Last updated: 30 Jun '10, 06:14

powered by OSQA