Giter Site home page Giter Site logo

CSS is being loaded twice about loadcss HOT 3 CLOSED

dy avatar dy commented on July 29, 2024
CSS is being loaded twice

from loadcss.

Comments (3)

tylersalminen avatar tylersalminen commented on July 29, 2024

I actually am having this issue in chrome but not firefox. Believe the issue is with how the browser handles changes in the media / rel / etc. attributes on the element. In this case, whenever the value of media is changed the css assets is re-downloaded, i.e. on the initial set to media="only x" then again when media="all". You can test this yourself by flipping the media attribute with a button manually and see in the network tab that the asset will be re-downloaded. I only noticed this happening recently in chrome and again this does not occur in firefox which leads me to believe it's a browser behavior issue.

from loadcss.

blq avatar blq commented on July 29, 2024

Can confirm this happens in Chrome 90 too.
(tried with both "only x" and "print" as pre-load media type)

from loadcss.

CramericaIndustries avatar CramericaIndustries commented on July 29, 2024

Had the same issue, same file was downloaded 3 times. Turned out that in Chrome dev tools I had the "Disable Cache" checkbox checked. After I unchecked it and reloaded the page the file was downloaded only once.

from loadcss.

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.