#redirecting sometimes doesn't load css or js
3 messages · Page 1 of 1 (latest)
Hi @compact robin. 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 are a few potential issues that could be causing your problem.
-
JavaScript or CSS not loading properly: There are reported issues with Astro where styles or JavaScript from components are not loading properly, especially in different environments (dev vs prod) or different browsers. This could potentially be the issue you're facing. Source (https://github.com/withastro/astro/issues/3265)
-
Issues with redirects: There are also reported issues with redirects in Astro. For example, when redirecting pre-rendered pages, Astro sometimes serves a "Redirecting to url]" placeholder. This could potentially interfere with the loading of your CSS or JavaScript. [Source (https://github.com/withastro/astro/issues/7889)
-
Issues with specific browsers or environments: Some issues only occur in specific browsers or environments. For example, server cookies aren't retrieved when redirecting from external requests in some browsers. Source (https://github.com/withastro/astro/issues/8608)
To troubleshoot your issue, you could try the following:
- Check if the issue occurs in different browsers or environments (dev vs prod).
- Check if the issue occurs with different components or only specific ones.
- Check if the issue occurs only when redirecting or also when directly accessing the page.