firebase / firebase/firebase-js-sdk

FR: Script injection with defer attribute

Open
#7,315 2 comments 1 reaction 0 assignees View on GitHub
api: appcheck feature request
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

Web

### Browser Version

Any

### Firebase SDK Version

9.20

### Firebase SDK Product:

AppCheck

### Describe your project's tooling

Nuxt with Nuxt Vuefire module

### Describe the problem

The tag `` appended to `<head>` by [this](https://github.com/firebase/firebase-js-sdk/blob/master/packages/app-check/src/recaptcha.ts#L174) or [this](https://github.com/firebase/firebase-js-sdk/blob/master/packages/app-check/src/recaptcha.ts#LL174C10-L174C39) functions is creating Core Web Vitals issues about Total Blocking Time.

Should be there a `defer` attribute to guarantee no blocking.

As you can see here, it is blocking for about 3 seconds.

![image](https://github.com/firebase/firebase-js-sdk/assets/459127/3b9bc4a4-628d-4117-b528-2d6b15ddb27f)

### Steps and code to reproduce issue

Just use AppCheck and initialize it with Recaptcha Enterprise provider.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.