Created
January 9, 2015 16:45
-
-
Save PereiraM/7eda71af8c2f3cd20346 to your computer and use it in GitHub Desktop.
ESI - device detect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<esi:assign name="touchoption" value="'(iPhone|iPod|Android|webOS|PlayBook)'"></esi:assign> | |
<esi:choose> | |
<esi:when test="$(HTTP_USER_AGENT) matches_i $(touchoption)"> | |
<esi:text> | |
<!--#include virtual="mobile.html"--> | |
</esi:text> | |
</esi:when> | |
<esi:otherwise> | |
<esi:text> | |
<iframe src="desktop.html" height="780" width="940" scrolling="no" frameborder="0"></iframe> | |
</esi:text> | |
</esi:otherwise> | |
</esi:choose> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment