-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Flash messages are typically used in a POST-redirect-GET process.
Because flash messages use the session, the target GET page cannot be cached.
See e.g. symfony/demo#859 on the topic.
Using JavaScript, we can fix the issue but we need to completely redesign how flashes work:
Instead of making the POST request trigger a 302, we would make it a 200 with a <meta>
redirection. Just before the meta tag, we would dump a <script>
one that would put the flashes in local storage. Then the header of all pages would contain JS to read that and display them.
We could deprecate the flash bag on the session while doing so.
fancyweb and sstokSeb33300, dborsatto, TomasVotruba, nCrazed, podhy and 2 morejvasseur, mablae, sstok, rpkamp, julienfalque and 4 more
Metadata
Metadata
Assignees
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)