@leewickham
1. I’ve just released an update which provides two filter hooks which will allow you customize which scripts use the async tag and which the defer tag:
site-reviews/async-scripts
and site-reviews/defer-scripts
Example usage (add to your theme’s functions.php
file):
/**
* Add a "defer" attribute to the polyfill.io script from Site Reviews
* @return array
*/
add_filter( 'site-reviews/defer-scripts', function( $handles ) {
$handles[] = 'geminilabs-site-reviews/polyfill';
return $handles;
});
Both of these filter hooks return an array of script handles.
2. The polyfill script only checks (and adds polyfills as needed) for the following browser features:
- CustomEvent
- Element.prototype.closest
- Element.prototype.dataset
- Event
These checks provide browser compatibility for IE 9-10.
3. The Polyfill service provide “fallbacks” that allow applications written in modern javascript, HTML, and CSS standards to work properly in older browsers (or in the case of Site Reviews: Internet Explorer v9-10).
In order to provide the polyfills, the Polyfill Service receives from your browser certain technical information including:
- browser details;
- connection details (such as your IP address which can identify your approximate location and/or name of your ISP);
- the URL of the web page which has made the request to the Service.
This information is used to determine which polyfills are required by the browser.
The only information that is retained is:
- the domain of the web page which has made the request to the Service;
- the user agent string for your browser;
- the set of polyfills that were requested by the web page.
According the the pricacy policy of the Polyfill Service, it does not retain any identifying information.
4. If you do not need the polyfill script on your website, you can disable it using the following code in your theme’s functions.php
file:
/**
* Disable the polyfill.io script from Site Reviews
* @return bool
*/
add_filter( 'site-reviews/assets/polyfill', '__return_false' );
-
This reply was modified 6 years, 3 months ago by Gemini Labs.
-
This reply was modified 6 years, 3 months ago by Gemini Labs.
-
This reply was modified 6 years, 3 months ago by Gemini Labs.
-
This reply was modified 6 years, 3 months ago by Gemini Labs.
-
This reply was modified 6 years, 3 months ago by Gemini Labs.
-
This reply was modified 6 years, 3 months ago by Gemini Labs.