Giter VIP home page Giter VIP logo

Comments (8)

Milo123459 avatar Milo123459 commented on May 29, 2024 1

Disabling rocket loader seems to have fixed it. Thank you!

from astro-theme-cactus.

Milo123459 avatar Milo123459 commented on May 29, 2024

also, whenever navigating between pages, this happens:

3M9fA1L9.mp4

from astro-theme-cactus.

chrismwilliams avatar chrismwilliams commented on May 29, 2024

Hi @Milo123459, so the first one I've had a couple of times. Just remove the classes in global.css.

The flashing is a bit more concerning as the inline script for theme switching has just been moved, however, I can't reproduce it my end. Could you tell me if this was in dev mode, and on what browser are you seeing this?

from astro-theme-cactus.

Milo123459 avatar Milo123459 commented on May 29, 2024

I'm also seeing it on other themes, but it's hosted in vercel, built with pnpm build. Chrome latest

from astro-theme-cactus.

chrismwilliams avatar chrismwilliams commented on May 29, 2024

That's really weird as the script is inlined and intentionally render blocking, I've also tried it with the cache disabled and a slow 3G preset.

If you don't have the same experience on the current netlify site, I might spin up a vercel build and see if I can get the same result

from astro-theme-cactus.

Milo123459 avatar Milo123459 commented on May 29, 2024

Doesn't happen on Netlify. I've moved over to a different theme, but it seems to only happen when on a custom domain?

For example, doesn't happen here: https://milo123459.vercel.app/about
But happens here: https://milo.solar

from astro-theme-cactus.

chrismwilliams avatar chrismwilliams commented on May 29, 2024

Ah okay, I'm not familiar on the codebase for that one.

I had a quick look at the waterfall's on both and it shows theme-toggle.js, which I presume is handling the switching, isn't being loaded in the same order, which is likely the issue.

It might have something to do with cloudflare adding 'rocket-loader.min.js' on the real domain as well.

from astro-theme-cactus.

Milo123459 avatar Milo123459 commented on May 29, 2024

Note: it may be worth adding this to the script tag in this project: data-cfasync="false"

from astro-theme-cactus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.