V
V
Valery Chupurnov2015-01-26 15:56:38
JavaScript
Valery Chupurnov, 2015-01-26 15:56:38

Why is gzip not enabled for js file?

Good time. I continue to develop a plugin to speed up the loading of the site. I'm doing tests on
https://developers.google.com/speed/pagespeed/insi...
Now a new misfortune 6127a6f34eca44fb8bea8dcb5d4fd3cc.png
The following is written in htaccess

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>

All scripts, pictures and styles are loaded with compression. And xdan.ru/media/plg_jspeedup/63135a6a1167dd634d457c9... is loaded without it.
Why can this happen?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Billy Milligan, 2015-01-26
@Billy_Milligan

Maybe because the script is on one domain, and the site itself is on another? And of course, your server will only compress the files that it has, and the browser downloads the script separately.

V
vamshop, 2015-06-21
@vamshop

Add this before your code:

<FilesMatch "\\.(js|css|woff|ttf|eot|otf)$">
  SetOutputFilter DEFLATE
</FilesMatch>

If mod_deflate is installed and activated in Apache, then it should help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question