Skip Navigation
Expand
Mobile site reverts to desktop, can we edit the mobile cookies?
Answer ID 5393   |   Last Review Date 10/31/2018

Is there a way to edit the cookie to stop the mobile site from reverting to the desktop site?

Environment:

Mobile, Cookies, Widgets
Oracle B2C Service, Customer Portal

Issue:

When selecting the desktop link from the mobile site, it diverts to the desktop site. If the browser is then closed, the settings seem to be stored in a cookie and I'm unable to get back to the mobile site. Is there a way to edit the cookie to save these changes?

Resolution:

There is an in built cookie feature which is actually an attribute of the widget which allows you to switch between the mobile and desktop sites.

From looking at the mobile.php template, it can be seen that the widget being used is called 'PageSetSelector'. Looking up this widget in the 'Widget Documentation' reference found on the customer portal will detail the following information about the attribute:

cookie_expiration

  • Name: Cookie Expiration
  • Type: INT
  • Description: The number of days in which the cookie will expire. If set to zero, the cookie will be a session cookie that expires when the user closes the browser.
  • Default: 10
  • Required: false
The attribute can then be adjusted as per the description to the setting of your preference; as stated the default setting for the cookie to expire is 10 days. If the cookie validity is only required for the current session, the value can be set to '0'. As 'cookie_expiration' is not a required attribute, adding this attribute to the 'PageSetSelector' widget will allow you to adjust this setting accordingly.