page-loaded-in
v0.0.6
Published
Get the load time for your page.
Downloads
195
Maintainers
Readme
Page Loaded In
This little JavaScript package will tell you how fast is your site by adding text to the desired place on your site.
Installation
The usuall installation:
npm install page-loaded-in
yarn add page-loaded-in
Or using CDN:
<script src="https://unpkg.com/[email protected]/dist/index.js"></script>
Usage
Include the code in your JavaScript file. For example, if you installed the package via npm, use require
to load the script.
require('page-loaded-in')
Make sure there is an HTML element with the class js-page-loaded-in
.
You should see how fast is your page now.
Example
I've placed the “Page loaded in” text on my site in the footer section.
The article
I wrote article about how this code works: https://www.silvestar.codes/articles/how-to-measure-page-loading-time-with-performance-api/