CSS3 PIE Forums
http://css3pie.com/forum/

Pie loads first time, but not after.
http://css3pie.com/forum/viewtopic.php?f=3&t=1761
Page 1 of 1

Author:  trainbolt [ Wed Aug 22, 2012 10:51 am ]
Post subject:  Pie loads first time, but not after.

I've used PIE in only 1 place and for some reason it loads in IE8 the very first time (and any time you clear the cache) but it doesn't load on any subsequent page loads.

The CSS
Code:
.box_wrapper {
   float:               left;
   width:            280px;
   height:            300px;
   position:            relative;
}
.box {
   padding:             15px;
   width:             250px;
   -moz-box-shadow:      0 0 20px #000000;
   -ms-box-shadow:      0 0 20px #000000;
   -o-box-shadow:      0 0 20px #000000;
   -webkit-box-shadow:   0 0 20px #000000;
   box-shadow:         0 0 20px #000000;
   position:             absolute;
   top:                0px;
   left:                0px;
   z-index:             10000;
   behavior:             url(PIE.htc)!important;
}


The HTML
Code:
<div class="box_wrapper">
   <div class="box">
      MY CONTENT HERE
   </div>
</div>


I also have this in my .htaccess file:

AddType text/x-component .htc

-----------------------EDIT------------------------

Everything seems to work fine in IE8 Compatibility Mode, but not when it's switched off.

Author:  bobspryn [ Wed Oct 03, 2012 12:20 pm ]
Post subject:  Re: Pie loads first time, but not after.

Same problem. You ever figure out why?

Author:  ladz [ Tue Oct 16, 2012 10:07 am ]
Post subject:  Re: Pie loads first time, but not after.

I have a very similar problem. It seems to be that when PIE.htc is used it gets loaded twice. The first load gets aborted, but not like a normal abort with an error code, the data is simply truncated. A subsequent load a few ms later works OK. It seems that if the correct fully loaded copy is present in cache, then it is fine.
The problem is quite strange and seems like a bug in IE.

Author:  dlabar [ Mon Nov 19, 2012 4:31 pm ]
Post subject:  Re: Pie loads first time, but not after.

I'm seeing the same truncated download of PIE.htc in IE9 as ladz mentioned above.
I've attached a screenshot of the network traffic from IE's developer tools showing PIE.htc being downloaded twice. The first time it gets downloaded it is truncated, only 8kb instead of 40kb.
Any thoughts about what may be causing this?

Attachments:
Screen Shot 2012-11-07 at 11.53.29 AM.png [45.58 KiB]
Not downloaded yet

Author:  jason [ Mon Nov 19, 2012 5:08 pm ]
Post subject:  Re: Pie loads first time, but not after.

Unfortunately the loading of the htc file is handled completely by IE, and I have no visibility into how it does that. If someone is able to find a pattern to what causes it to sometimes download twice and sometimes only once, that would be helpful to help users avoid it. But from a code standpoint there's nothing we can do within PIE itself to prevent the double download.

However, in the 2.0 codebase on GitHub, PIE has been rearchitected to try to lessen the cost of this double download. The .htc file has become a very small (~1kb) loader file which makes a subsequent request for a secondary logic file, specific to the browser version. This means that even if the .htc is downloaded twice, that cost is very small. Hopefully this will help alleviate the situation.

Author:  dlabar [ Mon Nov 19, 2012 7:08 pm ]
Post subject:  Re: Pie loads first time, but not after.

Looks like I figured out the root cause of the truncated download of PIE.htc. The apache server was missing some gzip configuration.
Added the following to the httpd.conf file:
AddOutputFilterByType DEFLATE text/x-component

I also had to use the 2.0 version of PIE has well. Thanks for the suggestion.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/