CSS3 PIE Forums

Small Delay while rendering gradients
Page 1 of 1

Author:  parthik [ Wed Oct 05, 2011 11:09 am ]
Post subject:  Small Delay while rendering gradients

I am using pie to render linear gradients on IE9
But i am facing a small delay before i actually see the gradient.
And in that time, I get the background as transparent.

The screenshot is attached.
After 1sec, the gradient appears.
This happens in all the gradients throughout the application.But the delay is less in other gradients.
But i cant afford this delay at all.

Untitled.png [4.75 KiB]
Not downloaded yet

Author:  AndyE [ Wed Oct 12, 2011 4:07 am ]
Post subject:  Re: Small Delay while rendering gradients

I believe HTC behaviours are non-blocking, meaning that your page may render before the HTC file has been downloaded and parsed. You might be better off with PIE.js, defined at the top of your HTML and then several blocking *<script>* elements just after where the element is defined. This should reduce the chances of the "flash of unstyled content".

For instance, you would define PIE.js at the top of your page:
<!--[if lt IE 10]>
<script type="text/javascript" src="path/to/PIE.js"></script>

Then, where an element appears in the markup, give it PIE immediately after:
<div id="loading-message">Loading...</div>
<script>window.PIE && PIE.attach(document.getElementById("loading-message"))</script>

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group