DEV Community

Juan Chehin
Juan Chehin

Posted on

1

Como configurar Etags en Apache Server

Introduccion

Una Etag es una cadena de texto única que representa la versión de un recurso en particular, podria ser una imagen un archivo JS o CSS. Los servidores nos dan la posibilidad de configurarlas a medida para que nuestra web funcione como querramos.

Configuracion en Apache Server

Para configurar y habilitar/desabilitar las Etags en nuestro servidor, en nuestro caso Apache Server,debemos acceder al archivo .htaccess .

Algo que debemos tener en cuenta es que para que nuestros Etags tomen efecto, debemos configuramos primero el
mod_write en apache (https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html).

Ahora si, abrimos nuestro archivo .htaccess y agregamos la siguiente linea:

<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None

Finalmente reiniciamos nuestro servidor apache con el comando
"sudo service apache2 restart"

Luego puede testear sus encabezados con firefox,chrome o con la herramienta de https://hackertarget.com/http-header-check/

Saludos y no se olviden de pensar en la performance de sus sistemas!

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay