# Error: Eliminate Render Blocking Resources

**URL:** <https://discourse.cakephp.org/t/error-eliminate-render-blocking-resources/8604>\
**Category:** Performance\
**Created:** [November 11, 2020, 7:38am UTC](https://discourse.cakephp.org/t/error-eliminate-render-blocking-resources/8604 "2020-11-11T07:38:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![genasanford](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@genasanford](https://discourse.cakephp.org/u/genasanford)\
**Post date:** [November 11, 2020, 7:38am UTC](https://discourse.cakephp.org/t/error-eliminate-render-blocking-resources/8604/1 "2020-11-11T07:38:29Z")

</div>

I have recently developed a website on Accounting and Bookkeeping Services([https://ebetterbooks.com](https://ebetterbooks.com)) and while checking the speed of the website I got a few errors, fixed most of them, except a few that is, Eliminate Render Blocking Resources, can someone provide me a fix to it?

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [November 12, 2020, 1:17pm UTC](https://discourse.cakephp.org/t/error-eliminate-render-blocking-resources/8604/2 "2020-11-12T13:17:15Z")

</div>

We can’t really provide a fix for it.  
It mostly boils down on:

- serve important CSS in-line:

```auto
<head>
  <style>
    body {
      height: 100vw;
    }
  </style>
</head>

```

- Move scripts to the bottom or use the `defer`/`async` attribute:

```auto
<head>
  <script src="/my--first-script.js" defer></script>
  <script src="/my-second-script.js" async></script>
</head>
<body>
  <header></header>
  <main></main>
  <footer></footer>

  <script src="/my-third-script.js"></script>
</body>

```

The difference between the 3 methods of loading scripts:

- `async` will run in “parallel” while the page keeps loading (only use it for scripts that do not rely on the DOM).
- `defer` wil run _after_ the page has completely finished parsing (use it for scripts that _do_ rely on the DOM or don’t use the `document.ready` methods).
- the one in the footer will load “as-is”.

The reason why you get the error is because your browser encounters a script while parsing, loads that in and only _after_ that is done, it’ll continue parsing.  
This causes a slowdown and is undesirable.
