Skip to main content

Notifications

Power Pages - Customize & Extend
Unanswered

Determine if user is mobile

(0) ShareShare
ReportReport
Posted on by 40

I would like to prevent certain content from being accessed if a user has switched to a mobile device.

 

Can this be determined using Liquid, as opposed to using javascript to check for window.innerWidth or window.navigator.userAgent

Categories:
  • Fubar Profile Picture
    Fubar 7,677 on at
    Re: Determine if user is mobile

    I don't think it is possible in Liquid (unless there is an undocumented item for it in the request object).

     

    They generally make use of CSS Media tags for formatting the content based on the window size.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics