SecurityChanged Event  
 

The SecurityChanged event occurs when the security state of the current page changes.

Syntax

Sub object_SecurityChanged ( [Index As Integer,] ByVal Level As Long )

Remarks

The SecurityChanged event is raised when the security level of the current connection changes, with the Level argument indicating the security level. For example, the level may change from neutral to secure once a certificate has been validated, or from secure to warning if mixed content is detected. Additional information about the state of the connection can be obtained by checking the value of the Certificate and Encryption properties which are updated when this event occurs.

Applications often use this event to update visual indicators such as a padlock icon or to apply additional security-related policies. It is important to note that this event may be raised multiple times during a single navigation, and earlier values should be discarded in favor of the most recent state.

The Level argument may be one of the following values:

Constant Value Description
webSecurityLevelUnknown 0 The security state could not be determined.
webSecurityLevelInsecure 1 The page was retrieved using plain HTTP or the site has an invalid certificate.
webSecurityLevelWarning 2 The page contains mixed content or only weak encryption is available.
webSecurityLevelNeutral 3 Local content or the browser is in a transitional/loading state.
webSecurityLevelSecure 4 The page was retrieved using HTTPS and the site has a valid certificate.

See Also

Certificate Property, Encryption Property, SecurityLevel Property, Navigate Method