Deseo optimizar la transferencia de datos habilitando compresión, ¿qué configuración debo poner para comprimir archivos de texto como html, css, javascript, etc?
entre Desarrolladores
Recibe ayuda de expertos
Registrate y pregunta
Es gratis y fácil
Recibe respuestas
Respuestas, votos y comentarios
Vota y selecciona respuestas
Recibe puntos, vota y da la solución
Pregunta
1 Respuesta
Prueba con esto en tu htaccess:
# ------------------------------------------------------------------------------
# | Compresión |
# ------------------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
# and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
# as `AddOutputFilterByType` is still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>
</IfModule>
Por favor, accede o regístrate para añadir un comentario.
Por favor, accede o regístrate para responder a esta pregunta.
En el blog
-
- 407134
- 1
- Jul 5, 2015
Sin Respuesta
-
- 167
- 0
- Mar 19
-
- 83
- 2
- Feb 26
-
- 1108
- 0
- Nov 7, 2023
-
- 297
- 0
- Sep 19, 2023
-
- 303
- 0
- Ago 21, 2023
-
- 386
- 0
- May 14, 2023
-
- 355
- 0
- Abr 21, 2023
-
- 442
- 0
- Mar 31, 2023
- ver todas
Preguntas relacionadas
- ¿Cómo habilitar caché en el cliente desde apache?
- ¿Cómo especificar que un sitio web he usado software bajo licencia Apache?
- Cómo Instalo el CMS Symphony2 Para Trabajar Con WampServer (En Windows)???
- Cómo rastrear visitas a una ruta específica en apache
- ¿Cómo evitar que otros sitios utilicen mis imágenes?
Actividad Reciente
ArtEze seleccionó una respuesta hace 7 horas
Bajar extensión de Chrome sin actualizar el navega…ArtEze respondió hace 7 horas
Bajar extensión de Chrome sin actualizar el navega…ArtEze preguntó hace 8 horas
Bajar extensión de Chrome sin actualizar el navega…ArtEze respondió hace 9 horas
No me deja instalar OracleArtEze respondió hace 10 horas
Formulario que guarde los datos de un jsonArtEze comentó hace 11 horas
Script /boot/ scrapingSantiago2610 comentó Mar 23
Acualizar ChoiceField en djangoSantiago2610 preguntó Mar 19
Acualizar ChoiceField en djangogonzalss preguntó Feb 26
Script /boot/ scrapingParkJo preguntó Ene 30
No me deja instalar Oracle
Ultimas Preguntas
Preguntas relacionadas
- ¿Cómo habilitar caché en el cliente desde apache?
- ¿Cómo especificar que un sitio web he usado software bajo licencia Apache?
- Cómo Instalo el CMS Symphony2 Para Trabajar Con WampServer (En Windows)???
- Cómo rastrear visitas a una ruta específica en apache
- ¿Cómo evitar que otros sitios utilicen mis imágenes?
Usuarios Top
- Leonardo-Tadei
- 227320 Puntos
- Peter
- 150470 Puntos
- white
- 75880 Puntos
- carlossevi
- 63580 Puntos
- magarzon
- 30650 Puntos
- pregunton
- 20400 Puntos
Todos los Usuarios Usuarios Nuevos
...