Skip to content

Commit c85a707

Browse files
graysonhicksgatsbybot
and
gatsbybot
authored
Clarify html.js vs. onPreRenderHTML (#34203)
* Clarify html.js vs. onPreRenderHTML Clarify a note that adding a script via html.js is the same as using onPreRenderHTML. * chore: format Co-authored-by: gatsbybot <[email protected]>
1 parent a442b2d commit c85a707

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/how-to/performance/improving-site-performance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ There are a number of places to put an inlined script, depending whether you nee
7979
- _Some deferring_: You can place the script in [onClientEntry](/docs/browser-apis/#onClientEntry) to have it execute after page load, but before the browser renders the page.
8080
- _More deferring_: You can place the script in [onInitialClientRender](/docs/browser-apis/#onInitialClientRender) to have it execute after the browser renders the page.
8181

82-
Note that if you are using [html.js](/docs/custom-html/), you should modify that file to include your snippet instead of using `onPreRenderHTML`.
82+
Note that if you are already using [html.js](/docs/custom-html/), you should modify that file to include your snippet instead of using `onPreRenderHTML`. This will have the same behavior.
8383

8484
### Reduce your JavaScript bundle cost
8585

0 commit comments

Comments
 (0)