Legacy Knowledge Base
Published Jul. 2, 2025

Using LMDD with Browser Mobile Emulators

Written By

Katlyn Lee

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I'm seeing that the LMDD does not always properly detect a mobile device if I'm using a browser mobile emulator. 

    Screenshot_from_2021-04-29_11-38-43.png
    In this example, the LMDD app was set up to display mobile device information using the Device Recognition API. The device information is not changing after toggling the browser mobile device emulator.

Environment

  • Liferay DXP

Resolution

  • This occurs because Liferay caches the device in the session to avoid having to recompute it on every request. Signing in or out of Liferay would trigger a new session and cause Liferay to properly recompute the device information based on the mobile emulator used. 

    Screenshot_from_2021-04-29_11-45-14.png

  • In order to not cache the device in the session, set the following property to false:
    #
    # Set this property to true to cache the user's device profile to the HTTP
    # session. If this property is false, then the portal will perform device
    # detection for each request.
    #
    mobile.device.session.cache.enabled=true

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base