问题
I have made a website in AMP (Accelerated Mobile Pages). I want to show some content in android but not in iOS.
Is there any way to detect android and iOS using AMP?
回答1:
You can use amp-access
for this, You have to identify user-agent
in authorization
and set a flag. here is an example which does that. In the example device-detection
checks if the device is android
otherwise returns Iphone
来源:https://stackoverflow.com/questions/54039020/how-to-detect-devices-android-ios-windows-in-amp-website