B
B
blazer052017-01-24 12:42:57
Django
blazer05, 2017-01-24 12:42:57

How do I get tested for PageSpeed ​​Insights?

Hello.
Tell me how to optimize a Django site so that when checking https://developers.google.com/speed/pagespeed/insights/ it passes without errors. In this case, when checking the site, the result is:
Correct it for sure!
Turn on compression.
Compressing resources using the gzip or deflate functions reduces the amount of data transferred over the network.
I installed django_compressor battery but it didn't help. The compression itself works, but the check does not pass, it gives out cached links of something like this.
mydomen.ru/static/cache/js/a37663a50ea3.js will reduce its size by 59.3 KB (64%).
In general, I'm trying to compress css and js, but in fact it doesn't work.
I understand that this is not necessary, but the client asked me to do it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Wolf, 2017-01-24
@Wolfnsex

I understand that this is not necessary, but the client asked me to do it.
You - no, site visitors - need :)
Turn on compression.
This is a problem and the task is not Django, but the web server, it turns on elementarily, for example like this (there are a million more examples in the search engine).
mydomen.ru/static/cache/js/a37663a50ea3.js will reduce its size by 59.3 KB (64%).
Usually at the bottom you are offered to download already compressed files, download them and replace yours with compressed ones, without forgetting to make a backup copy, just in case.

I
Ibrahim Kadirov, 2017-01-25
@iakadirov

After compression, it shows like this.
For example: Washingtonpost .
He doesn't have much either. But the project is really big.
If the percentage is more than 60-70, this is already excellent. And it matters how many elements are on the page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question