Fb:user-agent
From Facebook Developers Wiki
Contents |
[edit] Description
Displays the contents wrapped inside the tag to the specified user-agents. You can use fb:user-agent on the canvas page and the profile box. It serves as a tool to deal with browser idiosyncrasies.
User-Agent Resources
- http://www.user-agents.org/index.shtml - a list of common user agent strings
- http://whatsmyuseragent.com/ - what is your user agent string?
[edit] Attributes
| Required | Name | Type | Description | |
| required | includes | string | A comma-delimited list of strings to test for inclusion against the HTTP request's user-agent string. If a given include string matches the user-agent string, the content inside the include tag appears; otherwise it does not. | |
|---|---|---|---|---|
| optional | excludes | string | A comma-delimited list of strings to test for exclusion against the HTTP request's user-agent string. If a given include string matches the user-agent string, the content inside the include tag does not appear; otherwise it does appear. |
[edit] Examples
| <fb:user-agent includes="ie 6,ie 7"> Hi IE 6/7 users. </fb:user-agent> |
| <fb:user-agent excludes="firefox"> Hi people not using Firefox. </fb:user-agent> |
| <fb:user-agent includes="mozilla" excludes="firefox/2.0"> Hi Mozilla (but not Firefox 2.0) users. </fb:user-agent> |
| <fb:user-agent includes="ie" excludes="ie 6"> Hi IE (but not IE 6) users. </fb:user-agent> |
[edit] Notes
If both the includes and excludes attributes exist, the order of operation is to evaluate the includes then the excludes. For example, you can state includes="MSIE" excludes "MSIE 6.0". The matching is case-insensitive.
Should be used around style tags not within them.
