You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onload is for if you want to guarantee the page gets painted (like for a loading dialog UI or similar). It would only be good if the page has zero sub-resources, otherwise it would lead to unpredictable delays.
In this case, we're using a prerendered page to simulate a server side redirect, and the file will contain only the <meta> tag - there are no user-visible elements at all that we have to worry about getting partially displayed. It sounds like we should just add a direct <script>location.href = "..."</script> then.
Describe the problem
When prerendering, if we encounter a redirect it gets baked out as an HTML file with a
<meta>
refresh tag:kit/packages/kit/src/core/postbuild/prerender.js
Lines 341 to 344 in bc70b4e
Turns out (h/t @cramforce) it's actually quicker to use a
<script>
:(Do we even need the
onload
? Would it be quicker still without it?)Describe the proposed solution
Do both —
<script>
for speed,<meta>
for reliability.Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: