Fork me on GitHub

Browser Padlock Guide

This jQuery library creates browser padlock examples so you can educate your users about how to know if their connection to your site is secure.

in your <head>

<script src="path/to/jquery/1.10.1/jquery.min.js"></script> 
<link rel="stylesheet" href="padlock.css">
<script src="bowser.min.js"> </script> <!-- optional-ish -->
<script src="padlock.js"> </script>

in your <body>

<div class="padlock"> </div>

at the end of your <body>

<script>$('.padlock').padlock();</script>

options

You may set additional options through data- attributes or passing an options object like this .padlock({ ... }).

option description
data-padlock-browser or
{ browser: "..." }
A browser code from the table below. Defaults to autodetecting your browser.
data-padlock-domain or
{ domain: "..." }
The domain name to show in the address bar. Defaults to the domain name of the page.
data-padlock-path or
{ path: "..." }
The path part of the URL to show in the address bar. Defaults to the path of the current page.
data-padlock-ev-identity or
{ evIdentity: "..." }
Makes the padlock look as if the SSL certificate has an extended validation identity. Set this to the text to show.

browser codes

The following browsers are supported. Each browser code is tested to render properly in that particular browser version and in the latest version. Submit a pull request to add more!

Code Browser Versions
chome35 Google Chrome11–37
mobilechrome40 Chrome on Android40 / 4.2.2
firefox32 Mozilla Firefox14–32
firefox8 Mozilla Firefox8–13
ie9 Internet Explorer9–10
ie8 Internet Explorer8
opera15 Opera15–20
safari5 Safari4–5
android4 Android (stock browser)4.1.2

autodetecting your browser

chrome 11–37

firefox 14–32

ie 9–10

mobile chrome 40 (Android 4.4.2)

android 4 stock browser

opera 15–20

safari 4–5


unrecognized browser

firefox 8–13

ie 8