Forums
View unanswered posts | View active topics It is currently Mon Nov 24, 2014 3:36 pm



Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
 PIE causes duplicate downloads on files 
Author Message

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post Re: PIE causes duplicate downloads on files
@admintiger: That should not be the case. Browsers other than IE do not recognize the behavior property so they do not download the file at all. Unless you're referencing it in some strange way.


Sun May 29, 2011 4:44 pm
Profile

Joined: Sun May 29, 2011 4:02 pm
Posts: 3
Post Re: PIE causes duplicate downloads on files
I did some experimenting after my previous post and found that loading pages locally with Firefox, Chrome, Safari or Opera does not result in requests to the server for pie.htc. Even so, server log records clearly show the file being requested by other users where user agent strings identify web browsers other than IE. I wonder whether that might be due to intermediate proxy servers downloading all files referenced in CSS files to ensure that complete file sets are cached.


Sun May 29, 2011 8:55 pm
Profile

Joined: Sun May 29, 2011 4:02 pm
Posts: 3
Post Re: PIE causes duplicate downloads on files
THE CAUSE:
I was able to determine with some testing that IE loads pie.htc and executes the init() function on 'oncontentready' or 'ondocumentready' events. However, the file contents are not cached by IE during initialization. Later other functions are separately loaded as needed, resulting in multiple pie.htc downloads.

THE FIX:
I was able to fix the problem by coercing IE into preloading the full pie.htc file prior to stylesheet loading in the web page header, like this:
Code:
<!--[if IE]>
<link href="/path to/pie.htc" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="/path to/style.css " rel="stylesheet" type="text/css" />

Note that it is necessary to lie to IE about the pie.htc data type being "text/css". Type="text/x-component" will not work. Neither will type="text". IE must "think" pie.htc is a stylesheet for the trick to work.

That simple fix causes IE to load pie.htc only once.


Mon May 30, 2011 9:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.