safwanrahman / django-webpush

Web Push Notification Package for Django
GNU General Public License v3.0
368 stars 106 forks source link

Consider adding defer/async to webpush headers #139

Open marco-esubasta opened 4 months ago

marco-esubasta commented 4 months ago

Lighthouse doesn't like the amount of time it takes to load the scripts, it throws render blocking errors, that's why I recommend adding defer/async to the scripts, so that they are loaded asynchronously or right at the end of the load, reducing the time it takes to load the page.

Maybe make it optional, so that you can control wether you want it to load asynchronously or not.

image

Greeting from :argentina: :handshake: :bangladesh:

safwanrahman commented 4 months ago

Hi @marco-esubasta, thanks for reaching out. My knowledge in javascript is limited. Can you provide me some documentation or if you can make a PR that would be really helpful. Thanks! Vamos Argentina 🇦🇷