Skip to content

Commit

Permalink
Fix readme typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Cheng authored Feb 11, 2017
1 parent 8db3a7c commit 7afd13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ zxcvbn operates below human perception of delay for most input: ~5-20ms for ~25

Then try one of these alternatives:

1. Put your `<script src="zxcvbn.js">` tag at the end of your html, just before the closing `</body>` tag. This insures your page loads and renders before the browser fetches and loads `zxcvbn.js`. The downside with this approach is `zxcvbn()` becomes available later than had it been included in `<head>`not an issue on most signup pages where users are filling out other fields first.
1. Put your `<script src="zxcvbn.js">` tag at the end of your html, just before the closing `</body>` tag. This ensures your page loads and renders before the browser fetches and loads `zxcvbn.js`. The downside with this approach is `zxcvbn()` becomes available later than had it been included in `<head>`not an issue on most signup pages where users are filling out other fields first.

2. If you're using RequireJS, try loading `zxcvbn.js` separately from your main bundle. Something to watch out for: if `zxcvbn.js` is required inside a keyboard handler waiting for user input, the entire script might be loaded only after the user presses their first key, creating nasty latency. Avoid this by calling your handler once upon page load, independent of user input, such that the `requirejs()` call runs earlier.
Expand Down

0 comments on commit 7afd13c

Please sign in to comment.