<meta charset="utf-8">
and <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
are equivalent, keep the first one.<link rel="shortlink" href="https://selectra.info">
don’t provide a shortened url -> useless
There is scripts in the head, they should be moved to the bottom of the body (performance reasons)
<script async="" src="//amplify.outbrain.com/cp/obtp.js" type="text/javascript"></script>
<script async="" src="https://connect.facebook.net/en_US/fbevents.js"></script>
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script type="text/javascript" async="" src="//www.googleadservices.com/pagead/conversion_async.js"></script>
<script type="text/javascript" src="//www.googletagmanager.com/gtm.js?id=GTM-54H9M4S" async=""></script>
We use HTML5! so we must use the new blocks that it provides to structure pages, div
are no more an every case solution.
This pixel can be moved to the bottom of the body and a comment on its purpose should be useful, I don’t think that we need the div around.
<div class="region region-page-top">
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-54H9M4S" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
</div>
This svg load can be moved to the head section, just after the svg load of selectra.info
<script>
var ajaxMenu = new XMLHttpRequest();
ajaxMenu.open("GET", "//staging.cdn.selectra.info/img/app_config/v2/sprite-v2-3.svg", true);
ajaxMenu.send();
ajaxMenu.onload = function (e) {
var divMenu = document.createElement("div");
divMenu.innerHTML = ajaxMenu.responseText;
document.body.insertBefore(divMenu, document.body.childNodes[0]);
}
</script>
This block can be moved to the bottom of the body, just before the script part
<div class="info-box bottom is-hidden" id="cookie-compliance"><div class="container"><div class="info-box-content"><div class="info-box-msg"><span class="icon icon-24 hidden-xs-down"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm1 18h-2v-8h2v8zm-1-12.25c.69 0 1.25.56 1.25 1.25s-.56 1.25-1.25 1.25-1.25-.56-1.25-1.25.56-1.25 1.25-1.25z"></path></svg></span><p>En poursuivant votre navigation sur ce site, vous acceptez l'utilisation des cookies. <a href="https://selectra.info/mentions-legales" target="_blank">En savoir plus</a></p></div><button class="btn btn-xs btn-cta" type="button">Accepter</button></div></div></div>
<div class="tabs"></div>
<div class="region region-content">
<div id="block-system-main" class="block block-system">
<div class="content">
<div id="node-3375" class="node node-wide-container clearfix">
<div id="block-block-158" class="block block-block">
<div id="block-views-v2-1-home-home" class="block block-views">
<meta itemscope="" itemid="https://selectra.info/assurance/actualites/generalites/rapport-ffa-assurance-habitation-2016" itemref="md1 md7 md15">
<meta itemscope="" itemid="https://selectra.info/telecom/actualites/mobile/privileges-sfr-quels-changements" itemref="md2 md8 md17">
<meta itemscope="" itemid="https://selectra.info/telecom/actualites/bons-plans/bons-plans-semaine-31-32" itemref="md3 md9 md19">
<meta itemscope="" itemid="https://selectra.info/energie/actualites/marche/prix-electricite-gaz-evolutions-aout-2017" itemref="md4 md10 md13">
<meta itemscope="" itemid="https://selectra.info/telecom/actualites/bons-plans/bons-plans-semaine-29-30" itemref="md5 md11 md21">
<meta itemscope="" itemid="https://selectra.info/energie/actualites/acteurs/eni-lance-primeni-aide-aux-menages-leurs-travaux-renovation-energetique" itemref="md6 md12 md14">
<meta itemscope="" itemid="https://selectra.info/telecom/actualites/mobile" id="md17" itemref="md16 md28 md31">
<meta itemscope="" itemid="https://selectra.info/telecom/actualites/bons-plans" id="md19 md21" itemref="md18 md20 md29 md30 md32 md33">
<meta itemref="md22 md24">
<meta itemref="md23 md25">
<meta itemref="md26 md27">
Some css are loaded 2 times!
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
What are their purpose? explain it!
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__BJ6Ou6QsBRtnFTmxaakamOIS8n4QswDP2XnnZ1sxtaM__NBuvkP6eInGIkb1aJvUHx5PX79XApuxBDkk_77W5tYk__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__odPknapb4VCzsbgQPVRUtpAbRxne2KEciid15-S1dOw__d_Gk4y--gSuYSwR84ebDwUQclbuwFHBwZcpjuPZBRwM__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__8G_KhNEQQnr64ryGMSvavmodDUQ7t1rQZk4gl69Ghuo__-VZwo-nOHQ8jOwHBs8iAakXDmGrlSDpOMrchWH61En8__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
There is a lot of scripts! too much I think there is something to do here!
Some scripts are loaded 2 times!
Owl carousel
https://selectra.info/sites/default/files/advagg_js/js__iO7kRmqNCLN0Vz_-iMHvLbvOyaNsK0VMce_ZkmZqYS4__ut-p69DJFoDRJX5zZWAl698EvlPKWfyaLwVgDZJHzbw__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://staging.cdn.selectra.info/js/app_config/v1/owl.caroussel.js
jquery cookie
https://selectra.info/sites/default/files/advagg_js/js__qW7xlM-pwvDIG-yKkgH4v84ES52GRimdMtBtCQlFe7g__WtOLTa3uIMAy6BN6uswPR3bedCgSxzbJgQPAbNxveFw__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://staging.cdn.selectra.info/js/app_config/v2/package-js-app-config-test-19.min.js
We should async primary scripts and defer secondary scripts.
To understand the difference see this article: Async vs Defer
What are their purpose? explain it!
https://selectra.info/sites/default/files/advagg_js/js__FYKnstFE8nEEHUMGacOVrSjGuLF8oFg-gwfABG7yfy0__pZ_VH05e4czmMa27SpKLRW5AiTytpUslWC9BV24pG1w__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://staging.cdn.selectra.info/js/app_config/v1/export_caroussel.j
https://selectra.info/sites/default/files/advagg_js/js__BAOdUYPEZYNrkZ4o5ArmYZBDAitDUIfGxM-UaPR1xsU__TBsdgEWrLqU5K-uS07jccljirkU_9wlqn4-Zhxf7RpY__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://selectra.info/sites/default/files/advagg_js/js__UqV7HvnZH76FhPkqXxTz8WdinwQ8gsvFql0nj6YKMVw__mX45v8zAUMsFv7m9M4vEzMZKs_j6kqA7UIVZF5VVv28__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://cdn.selectra.info/api/scriptau/fr/scriptAU.js
https://selectra.info/sites/default/files/advagg_js/js__PFJj1J2VuqBUOWPmNm2rUZe2-pba4seh7BqLWxuwbBc__6lirxbTdH7loCG7BGjvM9lYACQY3pzS-55Nwvn6e3jo__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://cdn.selectra.info/api/iframe/resizeiframe.js
https://selectra.info/sites/default/files/advagg_js/js__kAC20HESm3r7_w_a1LSEYMPt1qOjb6GfZuE1IN0Ok14__XNQE4rFlYm2kxW_PmR4D-jaVCuIjXoH2V4P05tHucQo__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
We should only load the scripts that are needed on a page.
Are they used on the homepage?
The weight is of course very important if you want the page to load fast. Try to stay under 1MB, which is alreay very long to download over a slow connection.
1.83MB -> A lot of work can be done here.
These images could be optimized:
https://selectra.info/sites/all/themes/selecth/img/banners/home-selectra-fdf-prolongation.png
https://selectra.info/sites/default/files/styles/taxonomy_list_364x204/public/visuel-bon-plan-telecom-825x450_3.png?itok=IInpnZ5m
https://selectra.info/sites/default/files/styles/taxonomy_list_364x204/public/visuel-bon-plan-telecom-825x450_2.png?itok=w9HI6H8q
https://selectra.info/sites/default/files/styles/taxonomy_list_364x204/public/field/image/evolution-gaz-electricite-aout-2017.png?itok=4eF0Nt8u
https://selectra.info/sites/default/files/styles/taxonomy_list_364x204/public/privileges-sfr.png?itok=Zhvql2Mb
https://selectra.info/sites/default/files/styles/taxonomy_list_364x204/public/field/image/ffa-banner-article.png?itok=fcjUfD2v
https://staging.cdn.selectra.info/img/app_config/medias/logos/398.svg
https://staging.cdn.selectra.info/img/app_config/medias/logos/62.svg
These files can be minified:
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/
(html file)https://selectra.info/sites/default/files/advagg_js/js__qW7xlM-pwvDIG-yKkgH4v84ES52GRimdMtBtCQlFe7g__WtOLTa3uIMAy6BN6uswPR3bedCgSxzbJgQPAbNxveFw__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://staging.cdn.selectra.info/js/app_config/v1/export_caroussel.js
https://selectra.info/sites/default/files/advagg_js/js__FYKnstFE8nEEHUMGacOVrSjGuLF8oFg-gwfABG7yfy0__pZ_VH05e4czmMa27SpKLRW5AiTytpUslWC9BV24pG1w__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.js
Reduce the number of stylesheets by concatenating them.
Reduce the number of scripts by concatenating them.
Reduce the number of images by lazyloading them or by spriting them.
For each domain met, the browser needs to make a DNS look-up, which is slow. Avoid having to many different domains and the page should render faster.
Not found for https://selectra.info/modules/statistics/statistics.php
This is the number of requests that could be avoided, because of downloaded files that have the same content but are loaded from different URLs.
List of all requests that are less than 2 KB. Try to merge them with other files.
This is the number of images displayed below the fold that could be lazy-loaded. This is an excellent way to accelerate the loading time of an heavy page.
https://github.com/vvo/lazyload
List of all images that have a display:none
property, or one of their parents. These images are loaded by the browser even if they’re not visible. You might be able to find a way to lazy-load them, only when they get visible.
This page have too much dom elements (3979) -> we’ll have to reduce this number to get close from 1000
A deep DOM makes the CSS matching with DOM elements difficult.
It also slows down JavaScript modifications to the DOM because changing the dimensions of an element makes the browser re-calculate the dimensions of it’s parents. Same thing for JavaScript events, that bubble up to the document root.
Cleaning the html tree should fix this issue.
These duplicated IDs are coming from our svg icon sprite, wee need to change these IDs with class.
One of the main reasons of a poor scrolling experience is when too much JS is executed on each scroll event. Note that some devices such as smartphones and MacBooks send more scroll events than others. Reduce the number of DOM accesses inside scroll listeners. Put DOM queries outside them when possible.
We have 31 DOM access on scroll -> we should go for one!
We should have no javascript errors
53 is the number of events that are bound with the .bind() or the .on() function without using event delegation. This means jQuery binds each element contained in the object one by one. This is bad for performance.
Having a huge number of CSS rules hurts performances. If the number of CSS rules is higher than the number of DOM elements, there is clearly a problem.
Huge stylesheets generally occur when the different pages of a website load all the CSS, concatenated in a single stylesheet, even if a large part of the rules are page-specific. Solution is to create one main CSS file with global rules and one custom file per page.
Complex selectors are CSS selectors with 4 or more expressions, like “#header ul li .foo”. They are adding more work for the browser, and this could be avoided by simplifying selectors.
We have 1453 complex selectors to simplify
https://selectra.info/sites/default/files/advagg_css/css__odPknapb4VCzsbgQPVRUtpAbRxne2KEciid15-S1dOw__d_Gk4y--gSuYSwR84ebDwUQclbuwFHBwZcpjuPZBRwM__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
There is 222 colors used in our CSS, it’s too much we must find them and replace them with our colors.
There is 22 similar colors, our eyes can barely see the difference.
This is the number of different breakpoints found in the stylesheets' media queries.
This is when two or more selectors are strictly identical and should be merged.
https://selectra.info/sites/default/files/advagg_css/css__BJ6Ou6QsBRtnFTmxaakamOIS8n4QswDP2XnnZ1sxtaM__NBuvkP6eInGIkb1aJvUHx5PX79XApuxBDkk_77W5tYk__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__odPknapb4VCzsbgQPVRUtpAbRxne2KEciid15-S1dOw__d_Gk4y--gSuYSwR84ebDwUQclbuwFHBwZcpjuPZBRwM__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
This is the number of property definitions duplicated within a selector.
https://selectra.info/sites/default/files/advagg_css/css__BJ6Ou6QsBRtnFTmxaakamOIS8n4QswDP2XnnZ1sxtaM__NBuvkP6eInGIkb1aJvUHx5PX79XApuxBDkk_77W5tYk__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
It can be useful, but only as a last resort. It is a bad practice because it overrides the normal cascading logic. The more you use !important, the more you need it again to over-override. This conducts to a poor maintainability.
https://selectra.info/sites/default/files/advagg_css/css__8G_KhNEQQnr64ryGMSvavmodDUQ7t1rQZk4gl69Ghuo__-VZwo-nOHQ8jOwHBs8iAakXDmGrlSDpOMrchWH61En8__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__BJ6Ou6QsBRtnFTmxaakamOIS8n4QswDP2XnnZ1sxtaM__NBuvkP6eInGIkb1aJvUHx5PX79XApuxBDkk_77W5tYk__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://selectra.info/sites/default/files/advagg_css/css__odPknapb4VCzsbgQPVRUtpAbRxne2KEciid15-S1dOw__d_Gk4y--gSuYSwR84ebDwUQclbuwFHBwZcpjuPZBRwM__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
Many property prefixes such as -moz- or -webkit- are not needed anymore.
There is 518 offenders
Some tags included inside other tags are obvious. For example, when “ul li” is specified in a rule, “ul” can be removed because the “li” tag is nearly always inside an “ul” container (the “ol” container is quite rare). Same thing for “tr td”, “select option”, …
Lowering compexity in CSS selectors can make the page load a little faster.
https://selectra.info/sites/default/files/advagg_css/css__BJ6Ou6QsBRtnFTmxaakamOIS8n4QswDP2XnnZ1sxtaM__NBuvkP6eInGIkb1aJvUHx5PX79XApuxBDkk_77W5tYk__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
https://staging.cdn.selectra.info/css/app_config/v2/menu.cookie-compliance.footer.users-rating.reviews-module.selectra-light-5.min.css
https://selectra.info/sites/default/files/advagg_css/css__kSlbzp77wrAL-9jRGsyDdTBlGW2gUUXq9x-FK53FbaM__c90ITXMIGFt5arE8KymYiVBHHqBW_LNYtw_vBzNk9KI__zl6XKZGO9d7qESwFTyzhGes9xWqJDiO_zkdf-r8G-jk.css
We have 5 web fonts, it’s a lot, maybe we can think about a font stack for each OS.
HTTP/2 is the latest version of the HTTP protocol and is designed to optimize load speed. SPDY is deprecated but still very well supported.
The latest versions of all major browsers are now compatible. The difficulty is on the server side, where technologies are not quite ready yet.
When no caching is specified, each browser will handle it differently. Most of the time, it will automatically add a cache for you, but a poor one.
Counts responses with caching disabled (max-age=0)