[MGNLPN-193] Add possibility to disable adding of cookies Created: 06/Nov/14  Updated: 07/Nov/14  Resolved: 07/Nov/14

Status: Closed
Project: Magnolia Personalization
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Prabhakar Sekar Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

We should:

  1. add enabled flag to info.magnolia.personalization.visitor.BeanCookie
  2. check this flag in
  • info.magnolia.personalization.visitor.CookiesFormProcessor
  • info.magnolia.personalization.visitor.VisitorDetectorFilter.detect(HttpServletRequest, HttpServletResponse)

Moreover BeanCookie, CookiesFormProcessor could be moved to Form module since are not personalization specific.

Original issue:
The Visitor detector filter creates too many cookies. We noticed that it sets a Cookie (Ex: VISITOR=returning) for almost every request. Our application uses a maximum of 10-12 cookies. But, as this filter sets a cookie for each request, the browser quickly reaches the maximum number of cookie the browser can support. The browsers deletes old cookies when it gets new cookies that comes after reaching the maximum limit. While removing old cookies, it removes cookies that are needed by the application.

As of now, we could not use the application as the application needs our cookies to work properly. Please check and get back. Do let us know if you have any workaround for this problem.



 Comments   
Comment by Roman Kovařík [ 06/Nov/14 ]

Hello,

I suppose that you want to be able to use personalisation features so disabling of this filter is not an option for you, right?
As workaround:
A] You can lower the amount of cookies by setting:

  • /server/filters/visitor/visitorCookies/returning@level=0
  • /server/filters/visitor/visitorCookies/registered@level=0

B] Or you can implement your own visitor detector filter by extending of the default one to meet your needs. (info.magnolia.personalization.visitor.VisitorDetectorFilter).

Hope that helps.
Roman

Comment by Prabhakar Sekar [ 06/Nov/14 ]

Hi,

Thanks for the reply. Please let me know how i can disable this filter. Since the application itself is not working properly, we can disable the filter temporarily.Also, Please help me by sharing the link to the documentation on this Filter so that we can understand it and try to use it in a better way.

Comment by Prabhakar Sekar [ 06/Nov/14 ]

Hi,

We set the level as suggested and now it seems to be working fine.

Thanks again.

Comment by Roman Kovařík [ 06/Nov/14 ]

Hi,

I'm glad that this workaround works for you. Here you can read more about personalisation.
If you are not going to use different page variants for e.g. anonymous/registered users, you can disable VisitorDetectorFilter by setting:
/server/filters/visitor@enabled=false

Regards.
Roman

Generated at Mon Feb 12 06:35:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.