How To Enable Cookie?

How to enable/disable mod_deflate based on a cookie?

  • I would like to enable mod_deflate based on the presence and value of a certain cookie. I know it’s possible to do http://www.askapache.com/htaccess/htaccess-fresh.html#modrewrite2, but I’m not sure how to do that kind of stuff with mod_deflate. Is this possible at all? Any pointers?

  • Answer:

    You could try something like: SetEnvIf HTTP_COOKIE "NODEF" no-gzip dont-vary

Mathias Bynens at Server Fault Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.