Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6f8e11

Browse filesBrowse files
committed
Minor tweaks
1 parent f3e4a03 commit c6f8e11
Copy full SHA for c6f8e11

File tree

Expand file treeCollapse file tree

1 file changed

+12
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-4
lines changed

‎http_cache/varnish.rst

Copy file name to clipboardExpand all lines: http_cache/varnish.rst
+12-4Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,18 @@ at least for some parts of the site, e.g. when using forms with
6767
and clear the session when it is no longer needed. Alternatively, you can look
6868
into :ref:`caching pages that contain CSRF protected forms <caching-pages-that-contain-csrf-protected-forms>`.
6969

70-
Cookies created in JavaScript and used only in the frontend, e.g. when using
71-
Google Analytics, are nonetheless sent to the server. These cookies are not
72-
relevant for the backend and should not affect the caching decision. Configure
73-
your Varnish cache to `clean the cookies header`_. The goal is to retain only essential cookies—such as session cookies—and remove all others. By doing this, pages can still be cached when there is no active session. If you are using PHP and have not changed its default configuration, the session cookie is typically named PHPSESSID. Additionally, if your application relies on other important cookies, such as a "REMEMBERME" cookie for "remember me" functionality or "trusted_device" for 2FA, these cookies should also be preserved.
70+
Cookies created in JavaScript and used only on the frontend, such as those from
71+
Google Analytics, are still sent to the server. These cookies are not relevant
72+
for backend processing and should not influence the caching logic. To ensure
73+
this, configure your Varnish cache to `clean the cookies header`_ by retaining
74+
only essential cookies (e.g., session cookies) and removing all others. This
75+
allows pages to be cached when there is no active session.
76+
77+
If you are using PHP with its default configuration, the session cookie is
78+
typically named ``PHPSESSID``. Additionally, if your application depends on other
79+
critical cookies, such as a ``REMEMBERME`` cookie for :doc:`remember me </security/remember_me>`
80+
functionality or a trusted device cookie for two-factor authentication, these
81+
cookies should also be preserved.
7482

7583
.. configuration-block::
7684

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.