When Nginx caching is enabled with Plesk's default settings, all pages with a cookie is not be cached

Follow

Comments

4 comments

  • Avatar
    Edu MB

    Is there any way, to enable any cookies without having to write one by one?

    There are some pages that use session cookies, and these cookies are dynamic.

    0
    Comment actions Permalink
  • Avatar
    eamon

    needed to be improved

    0
    Comment actions Permalink
  • Avatar
    AbdulRaheem Alick

    This is not suitable for production environments at all. We use different analytics and solutions that always generate random cookie names. How are we supposed to put those. This defeats the whole reason for the caching at all.

    Like is the a way, Cache al requests except with certain cookies? The opposite of what is current available?

    0
    Comment actions Permalink
  • Avatar
    Jaka Prasnikar

    There should be a way to disable checking browser cookies. If I have pages where user has to be authorized (e.g. I set session) and then they go back where pages should be cached, nope cache bypass. Basically you cannot even force fastcgi cache for pages where you know you will not "SET" headers. I think there should be better control over this and NGINX should only bypass cache on pages that have explicit "SET-COOKIE" header. For everything else we should have control by either setting "cache-control" cookie or something like that from PHP. 

    It would be so easy to control nginx cache by just using headers "cache-control: no-cache, private" and/or "cache-control: max-age=315360000". How does a cookie check matter if I use php session cookie on /contact page to verify CSRF... 

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request