Essayez de charger vos JS de manière non bloquantes.
For lazy loading I use lazysizes. Images can saturate the bandwith with mobile connection. We can load the images (not ATF (Above the fold) images) after the onLoad event or just before the user need them (onScroll)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var critical = require('critical'); | |
| critical.generate({ | |
| src: 'https://www.example.com', // url | |
| dest: 'critical.css', // fichier de destination | |
| width: 412, // largeur de la fenêtre | |
| height: 732 // hauteur | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onOpen() { | |
| var spreadsheet = SpreadsheetApp.getActive(); | |
| var entries = [{name: "Get Results", functionName: "getResults"}]; | |
| spreadsheet.addMenu("WebPagetest", entries); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function push_to_browser($as, $uri) { | |
| header('Link: ' . $uri . '; rel=preload; as=' . $as, false); | |
| } | |
| $assets = array( | |
| // enter the path enter the type of file (script / style / etc...) | |
| '<css/critical.css>' => 'style' | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <img | |
| src="css/img/1200x800.jpeg" | |
| media="(min-width: 320px) 300w, (min-width: 400px) 400w, (min-width: 640px) 640w, (min-width: 1000px) 1000w" | |
| srcset=" | |
| css/img/450x400.jpeg 300w, | |
| css/img/450x400.jpeg 400w, | |
| css/img/768x400.jpeg 640w, | |
| css/img/1200x800.jpeg 1000w" | |
| alt="" class="img-responsive img-center" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use UTF-8 encoding for anything served text/plain or text/html | |
| AddDefaultCharset UTF-8 | |
| # Force UTF-8 for a number of file formats | |
| <IfModule mod_mime.c> | |
| AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml | |
| </IfModule> | |
| # FileETag None is not enough for every server. | |
| <IfModule mod_headers.c> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function forbidden_url(){ | |
| $forbidenUrls = array( | |
| 'theme-editor.php', | |
| 'themes.php', | |
| 'plugin-editor.php', | |
| 'plugin-install.php', | |
| 'plugins.php', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html class="no-js"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
