Enhance application behavior and style based on browser feature detection

What are common methods for detecting the type of browser running on a client? (Choose all that apply)

Use the window.addEventListener method.
Use the viewport <meta> tag.
Use JavaScript to query for the userAgent header.
Use the DisplayMode provider.