legacy-knowledge-base
公開されました Jul. 2, 2025

ブラウザ モバイル エミュレータでの LMDD の使用

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

learn-legacy-article-disclaimer-text

問題

  • ブラウザ モバイル エミュレータを使用している場合、LMDD がモバイル デバイスを正しく検出しない場合があります。

    Screenshot_from_2021-04-29_11-38-43.png
    この例では、LMDD アプリは Device Recognition APIを使用してモバイル デバイス情報を表示するように設定されています。 ブラウザー モバイル デバイス エミュレーターを切り替えた後、デバイス情報が変更されません。

Environment

  • Liferay DXP

解決策

  • これは、 Liferay がセッションでデバイスをキャッシュして、リクエストごとにデバイスを再計算する必要がないようにするために発生します。 Liferay にサインインまたはサインアウトすると、新しいセッションがトリガーされ、Liferay は使用されているモバイル エミュレーターに基づいてデバイス情報を適切に再計算します。

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

  • セッションでデバイスをキャッシュしないようにするには、次のプロパティを 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

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base