CDN links
<script data-request="true" src="http://cdn.jsdelivr.net/gh/mp-player/instant-page@master/dist/1.0/instant-page.min.js" crossorgin="anonymous"></script>Add this script before the closing </body> tag.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Instant Pages Loading</title>
<link rel="stylesheet" data-href="style.css">
</head>
<body>
<div>Your content here</div>
<script data-src="script.js"></script>
<!-- Put script here -->
<script data-request="true" src="http://cdn.jsdelivr.net/gh/mp-player/instant-page@master/dist/1.0/instant-page.min.js" crossorgin="anonymous"></script>
</body>
</html>Important
On value data-request must be set to "true".
Before used
Change all link/script element attributes href/src to data-href/data-src.
Example:
<link rel="icon" type="image/x-icon" data-href="favicon.ico">
<link rel="stylesheet" data-href="text-fonts.css">
<link rel="manifest" data-href="manifest.json">
<link rel="stylesheet" data-href="style.css">
<script data-src="script.js"></script>Required support and files
- Favicons (.jpg/.jpeg/.png/.webp/.ico/.svg)
- Web Fonts (.css or from Google Fonts)
- JSON (.json/.manifest)
- CSS Stylesheet (.css)
- JavaScript (.js)
Content source storage
All data content is stored in Local Storage.
It is highly recommended not to store a lot of data.
Content source update
The data will be updated automatically when the file content has new changes.
Source code: V1.0
License: MIT