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
-
- 702174
- 1
- Jul 5, 2015
Sin Respuesta
-
- 322
- 0
- Oct 18, 2024
-
- 263
- 0
- Jul 9, 2024
-
- 698
- 1
- Mar 19, 2024
-
- 539
- 2
- Feb 26, 2024
-
- 5428
- 0
- Nov 7, 2023
-
- 550
- 0
- Sep 19, 2023
-
- 616
- 0
- Ago 21, 2023
-
- 755
- 0
- May 14, 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
mchojrin respondió Dic 9, 2024
Ayuda , necesito mostrar datos creados solo por el…alyvrs preguntó Oct 19, 2024
Ayuda , necesito mostrar datos creados solo por el…ManHol preguntó Jul 9, 2024
pasar un archivo de excel a csv en pythonArtEze respondió Abr 24, 2024
Alguien sabe, no me ignorenArtEze seleccionó una respuesta Abr 24, 2024
Bajar extensión de Chrome sin actualizar el navega…ArtEze respondió Abr 24, 2024
Bajar extensión de Chrome sin actualizar el navega…ArtEze preguntó Abr 24, 2024
Bajar extensión de Chrome sin actualizar el navega…ArtEze respondió Abr 24, 2024
No me deja instalar OracleArtEze respondió Abr 24, 2024
Formulario que guarde los datos de un jsonArtEze comentó Abr 24, 2024
Script /boot/ scraping
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
- 150480 Puntos
- white
- 75880 Puntos
- carlossevi
- 63580 Puntos
- magarzon
- 30650 Puntos
- pregunton
- 20400 Puntos
Todos los Usuarios Usuarios Nuevos
...