52
52
53
53
### Install with composer
54
54
55
- Install the latest version
56
-
57
55
``` bash
58
56
composer require shinsenter/defer.php
59
57
```
60
58
61
59
62
- Install older version (for PHP <7.1.3)
63
-
64
- ``` bash
65
- composer require shinsenter/defer.php:^2.0
66
- ```
67
-
68
-
69
60
### Load the library into your program
70
61
71
62
``` php
@@ -77,11 +68,13 @@ require_once __DIR__ . '/vendor/autoload.php';
77
68
```
78
69
79
70
80
- ### Backward compatible
71
+ ### Requirements
72
+
73
+ This library requires PHP 5.6 or above so you need this version or the latest version of PHP installed on your system.
81
74
82
- This library recommends that the server is running PHP version 7.3 or greater for better performance and support .
75
+ It recommends that the server is running PHP version 7.3+ or above for better performance and supports .
83
76
84
- Library's options of v2.x version are not backward compatible with previous release's options. Please read the library manual for more details.
77
+ Library options from v2.x are not backward compatible with previous release's options. Please read [ library manual] ( #options ) for more details.
85
78
86
79
87
80
## Usages
@@ -109,7 +102,7 @@ var_dump($result2);
109
102
```
110
103
111
104
112
- ### Customize the options of the library
105
+ ### Options
113
106
114
107
``` php
115
108
// Include the library
@@ -132,7 +125,7 @@ $options = [
132
125
'manually_add_deferjs' => false,
133
126
134
127
// URL to defer.js javascript file.
135
- // Default: https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.1 .0/dist/defer_plus.min.js
128
+ // Default: https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.3 .0/dist/defer_plus.min.js
136
129
'deferjs_src' => \AppSeeds\DeferConstant::SRC_DEFERJS_CDN,
137
130
138
131
// URL to javascript contains fixes.
@@ -375,16 +368,16 @@ Only few options of this library are applicable to AMP pages (minifying HTML con
375
368
376
369
### Defer.js
377
370
378
- https://github.com/shinsenter/defer.js/
371
+ [ https://github.com/shinsenter/defer.js/ ] ( https://github.com/shinsenter/defer.js/ )
379
372
380
373
🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.
381
374
382
375
383
376
### Wordpress plugin
384
377
385
- https://github.com/shinsenter/defer-wordpress/
378
+ [ https://github.com/shinsenter/defer-wordpress/ ] ( https://github.com/shinsenter/defer-wordpress/ )
386
379
387
- ⚡️ A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy load almost anything .
380
+ ⚡️ A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy- load everything .
388
381
389
382
390
383
### Laravel package
0 commit comments