-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: ThemeFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releaseSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Affects aesthetics, professional look and feel, “quality” or “usability”.
Description
Previously this issue was reported in #7931 and #16568, but no one was able to reproduce it.
Preconditions
- Magento 2.2.5 installed via composer
Steps to reproduce
- Open desktop browser Firefox
- Navigate to
about:config
- Find "dom.storage.enabled" option and change to "false"
- Navigate to Magento 2.2.5 (frontend), open developer tools >> Storage >> Cookies and look at list (there are 33 cookies)
- Duplicate tab (open the same page in another page) - you will have 43 cookies.
- Try to duplicate tab again - you will have 52 cookies.
Expected result
- Cookies list should not grow such fast
Actual result
- We can take more then 50 cookies that leads to exception that described in Unable to send the cookie. Maximum number of cookies would be exceeded #7931 and local/session storage is mismanaged, particularly when it doesn't exist #16568
Tech note
I investigated issue described in #16568 and found that we have 2 different polyfill implementaions for localStorage and sessionStorage:
- Added to page html (https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml)
- As part of jquery.storageapi library - https://github.com/magento/magento2/blob/2.2-develop/lib/web/jquery/jquery.storageapi.min.js
These implementation are fully different. 1st one works good, but 2nd one adds strange behavior - adds separate cookie with ls_
prefix in name for each item that should be stored in localstorage and ss_<some_id>_
for session storage. As result - when customer goes through website - it will add new and new cookies (because of this strange ss_<some_id>_
prefix).
Sometimess, we're having 2nd implementation used instead of 1st one.
oviliz, JosephMaxwell, eerorika, slackerzz, webspeaks and 2 more
Metadata
Metadata
Assignees
Labels
Component: ThemeFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releaseSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Affects aesthetics, professional look and feel, “quality” or “usability”.