#page blinks on page load

3 messages · Page 1 of 1 (latest)

modern knot
winged oxideBOT
#

Hi @modern knot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information provided in the extracts, there could be a couple of reasons why your Astro site might be experiencing a "blink" or flash when loading.

  1. Redirects: As per the GitHub issue #7889 (https://github.com/withastro/astro/issues/7889), there could be a brief flash of "Redirecting to... [url]" before being served the target URL of the redirect. This issue was discussed but has not been resolved for Vercel.

  2. Client-side hydration issues: According to the Astro documentation on deploying to Cloudflare (https://docs.astro.build/en/guides/deploy/cloudflare/), client-side hydration may fail as a result of certain settings, causing a flash. If you see Hydration completed but contains mismatches in the console, this could be the cause.

  3. JavaScript and CSS loading: Astro's performance advantage comes from minimizing JavaScript usage and optimizing loading times. If there's a lot of JavaScript or CSS that needs to be loaded and parsed before the page can be displayed, this could cause a noticeable delay or "blink". The Astro documentation on server-side rendering (https://docs.astro.build/en/guides/server-side-rendering/) suggests using streaming to improve page performance.

Without more specific information about your site and its configuration, it's hard to provide a more precise answer. I would recommend checking these potential issues and see if any of them apply to your situation.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: