Active Content Negotiation

Description
The response that a server replies with to a request in an active content negotiation style contains a script that makes additional (more specific) requests based on the user agent's characteristics [47].
    Example: 
    If you have an HTML page that includes javascript that asks
      IF (browser supports MyAwesomeLanguage 1.1) 
                THEN (load URL for myAwesomeLanguage 1.1 content)
      ELSE IF (browser supports MyAwesomeLanguage 1.0)
                THEN (load URL for myAwesomeLanguage 1.0 content)
      ELSE 
          (insert content for 'can't display model')
    

Advantages and Disadvantages
Advantages Disadvantages
  • The reduction of user interaction by automating the sending of additional requests.
  • The provision of a personalised representation that matches the capabilities of the user agent.
  • The need for multiple requests to build the final representation.
  • The introduction of potential threats due to script execution, e.g. a man-in-the-middle attacker can intercept or rewrite the response to include malicious JavaScript code. Malicious active content can steal the user's credentials, acquire sensitive data about the user, or attempt to install malware on the user's system (by leveraging vulnerabilities in the browser or its plugins, for example).
  • The prohibition of active content by default in the most recent versions of browsers due to the vulnerabilities mentioned above.

References
[{{ reference.id }}] : {{ reference.title }}