Skip to content

Commit 0212779

Browse files
committed
Tweaks and rewordings to improve the article
1 parent 99781f8 commit 0212779

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cookbook/session/avoid_session_start.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
Avoid Starting Sessions for Anonymous Users
55
===========================================
66

7-
Sessions in Symfony applications are automatically started when they are necessary.
7+
Sessions in Symfony applications are automatically started whenever they are necessary.
88
This includes writing in the user's session, creating a flash message and logging
99
in users. In order to start the session, Symfony creates a cookie which will be
10-
sent for every request.
10+
added to every user request.
1111

12-
However, there are other scenarios when a session is started and therefore, a
12+
However, there are other scenarios when a session is started automatically and a
1313
cookie will be created even for anonymous users. First, consider the following
14-
code commonly used to display flash messages:
14+
template code commonly used to display flash messages:
1515

1616
.. code-block:: html+jinja
1717

@@ -37,7 +37,7 @@ cookie. To avoid this behavior, add a check before trying to access the flash me
3737
{% endif %}
3838

3939
Another scenario where session cookies will be automatically sent is when the
40-
requested URL is covered by a firewall, no matter if anonymous users can access
40+
requested URL is covered by a firewall, even when anonymous users can access
4141
to that URL:
4242

4343
.. code-block:: yaml
@@ -51,4 +51,4 @@ to that URL:
5151
anonymous: ~
5252
5353
This behavior is caused because in Symfony applications, anonymous users are
54-
technically authenticated,.
54+
technically authenticated.

0 commit comments

Comments
 (0)