March 24, 2012

HTML un-styled is shown first and then changes to styled version, what could cause this?

Question by Ryan Detzel

It doesn’t always happen so it makes me think it happens when the browser doesn’t have the css cached. What happens is the page loads and you see the entire page without any css and then it “pops” in styled. The css files are hosted off a different domain and they’re all in the header of the document. Any thoughts?

Browser around the source I noticed that we have google optimizer code on some pages. Could this cause this to happen?

Answer by Starx

There might be many reasons, behind this, but as you described:

Your CSS are not included in inside the <head>

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!