Commit 8d70284
committed
Administration: Add the
The intention behind this change is to prevent sensitive data in responses for logged in users being cached and available to others, for example via the browser history after the user logs out.
The `no-store` directive instructs caches in the browser or within proxies not to store the response in the cache. This is subtly different from the `no-cache` directive which means the response can be cached but must be revalidated before re-use. WordPress does not use ETag headers by default therefore this does not achieve the same result.
The `private` directive complements the `no-store` directive by specifying that the response contains private information that should not be stored in a public cache. Som
e proxy caches may ignore the `no-store` directive but respect the `private` directive, thus it is included.
The existing `Cache-Control` header for users who are not logged in remains unchanged, and the existing cache prevention directives remain in place for backwards compatib
ility.
Props soulseekah, luehrsen, Dharm1025, markdoliner, rutviksavsani, ayeshrajans, paulkevan, clorith, andy786, johnbillion
Fixes #21938, Fixes #57627
git-svn-id: https://develop.svn.wordpress.org/trunk@55968 602fd350-edb4-49c9-b593-d223f7449a82no-store and private directives to the Cache-Control header when preventing caching for logged in users.1 parent 881f566 commit 8d70284
File tree
2 files changed
+51
-6
lines changed- src/wp-includes
- tests/e2e/specs
2 files changed
+51
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | | - | |
| 1480 | + | |
1481 | 1481 | | |
1482 | 1482 | | |
1483 | | - | |
| 1483 | + | |
1484 | 1484 | | |
1485 | 1485 | | |
| 1486 | + | |
| 1487 | + | |
1486 | 1488 | | |
1487 | 1489 | | |
1488 | 1490 | | |
1489 | 1491 | | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1490 | 1496 | | |
1491 | 1497 | | |
1492 | | - | |
| 1498 | + | |
1493 | 1499 | | |
1494 | 1500 | | |
1495 | 1501 | | |
1496 | 1502 | | |
1497 | | - | |
| 1503 | + | |
1498 | 1504 | | |
1499 | 1505 | | |
1500 | 1506 | | |
| |||
1509 | 1515 | | |
1510 | 1516 | | |
1511 | 1517 | | |
1512 | | - | |
| 1518 | + | |
1513 | 1519 | | |
1514 | 1520 | | |
1515 | 1521 | | |
| |||
1536 | 1542 | | |
1537 | 1543 | | |
1538 | 1544 | | |
1539 | | - | |
| 1545 | + | |
1540 | 1546 | | |
1541 | 1547 | | |
1542 | 1548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments