124
edits
(add the ALA article linked in Hicks's comments) |
(→User-Agent Sniffing: a few brief updates) |
||
| Line 22: | Line 22: | ||
==User-Agent Sniffing== | ==User-Agent Sniffing== | ||
Finally, if the only solution available to you is sniffing the user-agent string and sending different codepaths to different | Finally, if the only solution available to you is sniffing the user-agent string and sending different codepaths to different “browsers,” you should sniff by '''rendering engine name and version''', not by the user-agent (browser) using the engine. | ||
Note that some web browsers have switched rendering engines over the course of their lifetimes (Epiphany switched from Gecko to WebKit, iCab switched from the “iCab 3” engine to WebKit) or support multiple rendering engines (Netscape 8, versions of Epiphany just prior to the switch to WebKit), so sniffing for browser name could cause you to use the wrong codepath or would require you to write extra code to differentiate between versions; all of these troubles can be avoided by sniffing for rendering engine instead when you must sniff. | |||
===About Gecko=== | ===About Gecko=== | ||
edits