Buckets:
| title: No Sync Scripts | |
| > Prevent synchronous scripts. | |
| ## Why This Error Occurred | |
| A synchronous script was used which can impact your webpage performance. | |
| ## Possible Ways to Fix It | |
| ### Script component (recommended) | |
| ```jsx filename="pages/index.js" | |
| import Script from 'next/script' | |
| function Home() { | |
| return ( | |
| <div class="container"> | |
| <Script src="https://third-party-script.js"></Script> | |
| <div>Home Page</div> | |
| </div> | |
| ) | |
| } | |
| export default Home | |
| ``` | |
| ### Use `async` or `defer` | |
| ```html | |
| <script src="https://third-party-script.js" async /> | |
| <script src="https://third-party-script.js" defer /> | |
| ``` | |
| ## Useful Links | |
| - [Efficiently load third-party JavaScript](https://web.dev/efficiently-load-third-party-javascript/) | |
Xet Storage Details
- Size:
- 750 Bytes
- Xet hash:
- b79e3274fcd1fd240b9518d8484a6cebc19f0479c615ed33a822c45687da7d16
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.