Load CSS in header to improve the looks and parts of performance

Posted in: Newspaper
Post count: 7

Hello guys

I have noticed that whenever I open up my website, the website loads in fine but without CSS.
It takes a good few seconds for the CSS to load in, and in the meantime, the website looks ‘unprofessional and ugly’, so I was wondering if you know the proper way to load in the CSS in the header to load in alongside when a page opens.

I’ve Googled it and I was suggested to contact my theme developer as you might have some handy instructions ready or perhaps some suggestions to make it all possible, while not conflicting any plugin’s performance etc.

I am also using MaxCDN, but it still seems to be slower than expected. I am currently working on revamping a lot to make the performance outstanding (currently it’s pretty bad on mobile and just ok on desktop)

All help is appreciated and thank you in advance.

Post count: 9544

If you look at my long winded tutorial thread in the docs > tutorials > DIY best of forums; I cover ideas for capturing critical CSS using an online tool for this, then placing that critical CSS in header.php and moving main style sheet to footer.

However, this method will no longer be necessary if your host is moving to php7 + https + http/2 which supercedes this method.

Post count: 7

Thank you Chris, the tutorials are super easy to understand and are all very helpful. I’ll definitely try some out tomorrow and see how it goes.

Post count: 9544

I think this is the one I tested out couple of years back, then went to the paid one…

try –
https://jonassebastianohlsson.com/criticalpathcssgenerator/

and then the step up, which I use
https://criticalcss.com/

Totally worth the couple bucks … !

(I used the above for past couple of years; but on my new project for 2018 just discovered the whole thing with http/2 not needing to do it; ironically, now I’m ‘undoing’ the critical CSS thing for our new 2018 corporate site … *doh* )

  • This reply was modified 8 years by simchris.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.