Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I'm just working on a website and noticed something very strange and annoying.
The CSS seems to load after the page contents. It's very quick so you have to be watching for it, but it's noticeable and ruins the look and feel of this site in particular (although the site is in very early days).

It was working fine as an HTML page before including Couch. Is there something I'm doing wrong?

I've tried:
Code: Select all
<link rel="stylesheet" href="<cms:show k_site_link />css/jl.css" type="text/css">

and
Code: Select all
<link rel="stylesheet" href="css/jl.css" type="text/css">


Both produce the same effect.

www.jonlambell.co.uk/pl

On a note, this is the first time I've used CouchCMS so I'm more than likely missing something somewhere.

Thanks
Hi and welcome @Largoh,

I visited your website and did not experience the delayed loading that you described. Nothing in the HTML or CSS leads me to think you are doing anything that would cause such a problem. Do note nevertheless, serving a static HTML file will always be faster than a PHP file because of the server-side processing inherent in PHP. This should not alter the way in which the page is rendered by your browser however...
I also opened it and didn't see anything unusual. But the symptoms you mention seem like Flashes of unstyled content or FOUC. http://en.wikipedia.org/wiki/Flash_of_unstyled_content
Hi Jon,

Even I couldn't notice the delay you mentioned (except for the post heading texts showing a brief delay - but that is the 'ease-in' transition set by your CSS).

You see, even if we take into consideration the delay introduced by PHP as mentioned by @cheesypoof (which really should be imperceptible), that does not explain the phenomenon you report.
This will only result in the browser receiving the HTML document a little later as compared to a static HTML page. The CSS gets called by the browser only after once the HTML document has been received. So in either case the visible results should be no different.

The 'Network' tab of Chrome shows that the HTML document gets received in 425ms and then the CSS is called which arrives in another 502ms.

If you wish, you can turn on caching in config file. This will make Couch serve a static copy of the page which is almost the same as serving static HTML. Please see if this corrects the problem (please make sure to log off from Couch admin or use a different browser as admins are not served cached pages).

Hope this helps. Do let us know.
Thanks.
KK wrote: Hi Jon,

Even I couldn't notice the delay you mentioned (except for the post heading texts showing a brief delay - but that is the 'ease-in' transition set by your CSS).

You see, even if we take into consideration the delay introduced by PHP as mentioned by @cheesypoof (which really should be imperceptible), that does not explain the phenomenon you report.
This will only result in the browser receiving the HTML document a little later as compared to a static HTML page. The CSS gets called by the browser only after once the HTML document has been received. So in either case the visible results should be no different.

The 'Network' tab of Chrome shows that the HTML document gets received in 425ms and then the CSS is called which arrives in another 502ms.

If you wish, you can turn on caching in config file. This will make Couch serve a static copy of the page which is almost the same as serving static HTML. Please see if this corrects the problem (please make sure to log off from Couch admin or use a different browser as admins are not served cached pages).

Hope this helps. Do let us know.
Thanks.



Thanks for the responses. It does sound like FOUC. I've never experienced it before to be honest, at least not that I've noticed. I think I may notice it more now because of the ease-in.
The ease in is the biggest problem. It just looks odd.
I'll try chaching later when I get home.

Thanks
5 posts Page 1 of 1