What might cause CSS to fail to load occasionally on all browsers?
I've had a similar thing happen that I was able to fix by including a base style sheet first using the "link rel" method rather than "@import". i.e. move your [base css file] inclusion to:
<link rel="stylesheet" href="[base css file]" type="text/css" media="screen" />
and put it before the others.
Complete list of reasons why a css file might not be working
Are you sure the stylesheet is loaded? You can see it using the "Net" tab of Firebug on firefox, or on "Network" tab of the Console of your browser.
(If 1 works) can you have a simple sample style and see whether this is getting applied (and visible in the console)?
Flask does not load CSS file..?
Flask sets cache control headers on static resources, and your browser will cache those files up to 12 hours.
Your options are:
Set the
SEND_FILE_MAX_AGE_DEFAULT
configuration directive to a shorter value; it is set to 43200 but you can set it to 0 if you really want to.Add a cache buster query parameter to your static URLs; if your static URLs end with
?<somerandomvalue>
your browser will reload the resource if that random value ever changes. You could do this by hand each time or you can use this Flask snippet to override theurl_for()
function to add such a value for you based on the file modification time.Use an incognito browser window (private browsing mode in other browsers) to force your browser to ignore the cache for a specific session. Each time you open a new incognito tab or window, the cache should be invalidated for that session.
Images (and css) randomly fails to load with no apparent reason
After not being able to solve the issue for a couple of days. I've decided to redeploy everything using a slightly different method.
That solved the issue but the reason behind slow/random load fails stays unknown.
Related Topics
How to Alternate The Number of Children Between Odd and Even Rows
React Js: Apply Material-Ui CSSbaseline
What Is Result of Calc() in CSS
How to Reference Google Material-Design-Icons After Npm Install
Why Does Svg Get Blurred When Scaled Under Webkit Browsers
"_Msg_@@Extension_Id_" Doesn't Work and Webfonts Don't Load
Background Image in Styled Components React
How to Split Generated CSS Code Form Tailwind
How to Pass Value from Ts File to SCSS File in Same Component in Angular 2+
How to Use CSS Rotate() in Th Table Tags
Zoomed-Out Sizing in Twitter Bootstrap
CSS Ul Li Image to Align with Text
CSS: :Before: :After Pseudo-Element of Class Not Working
How to Change CSS of Columns - Reacttable
Wicked_Pdf Stylesheet Not Working on Heroku