Polyfill CDN, defer and GDPR

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Polyfill CDN, defer and GDPR

Post by flomo » 31 Jan 2020, 18:00

I noticed, that the default Aimeos theme makes a request to https://cdn.polyfill.io/v2/polyfill.min.js

I think there are a few issues with this:

- This might breach GDPR conformity of a site, by sending data to a third party server
- Loading the polyfill script at the bottom of the page and with "defer" option might load the script too late (when other scripts requiring a polyfill are already being executed)

Therefore my question: is it required to use polyfill for more or less modern browsers (using the standard JS scripts from Aimeos)?

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Polyfill CDN, defer and GDPR

Post by aimeos » 01 Feb 2020, 10:26

flomo wrote: 31 Jan 2020, 18:00 - This might breach GDPR conformity of a site, by sending data to a third party server
GDPR only makes statements about cookies for tracking but the server doesn't send any cookie so using the polyfill script is save.
flomo wrote: 31 Jan 2020, 18:00 - Loading the polyfill script at the bottom of the page and with "defer" option might load the script too late (when other scripts requiring a polyfill are already being executed)
You may be right. Can you create a PR that removes the defer attribute?
flomo wrote: 31 Jan 2020, 18:00 Therefore my question: is it required to use polyfill for more or less modern browsers (using the standard JS scripts from Aimeos)?
It's only required for IE 11 I think as we are not using much advanced JS. For a current Chrome and Firefox browser, the returned script doesn't contain any polyfills.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Polyfill CDN, defer and GDPR

Post by flomo » 03 Feb 2020, 16:13

GDPR only makes statements about cookies for tracking but the server doesn't send any cookie so using the polyfill script is save.
GDPR is also about sharing personal user data with third parties, and that is what happens, when you make a call to a CDN. There are cease and desist cases for german websites because they are using Google Fonts.
You may be right. Can you create a PR that removes the defer attribute?
I just checked out the latest aimeos-laravel, but couldn't find the deferred call to the polyfill script. Maybe it was me who added it when I started with the project :?
It's only required for IE 11 I think as we are not using much advanced JS. For a current Chrome and Firefox browser, the returned script doesn't contain any polyfills.
Ok thanks. I'll try to remove it.

Post Reply