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



Reply to topic  [ 6 posts ] 
 Accessing PIE.htc from a different domain than the host doc? 
Author Message

Joined: Thu Aug 12, 2010 9:41 am
Posts: 2
Location: Berkeley, CA
Post Accessing PIE.htc from a different domain than the host doc?
Hi. First off, I want to give a huge thanks to Jason for writing this amazing piece of code, giving it to us, and working so hard to answer questions in the forums. Now to my issue...

I'm trying to use PIE with a hosted app (Shopify) that places all asset urls (images, css, js, htc, etc) on a cdn. So, while my html document's location may be at http://www.twelvedays.com, the PIE.htc file will be at a url like http://static.shopify.com/s/files/1/005 ... 1281106516.

So, in my html I'm calling PIE like so:

<!--[if IE]>
<style>
.my_crazy_div { behavior: url(http://static.shopify.com/s/files/1/005 ... 1281106516); }
</style>
<![endif]-->

Shopify is serving the .htc file with the correct content-type, but IE is giving me an "access denied" error when I load the page. I suspect this is due to the .htc file residing on a different domain than the host document. Has anyone come across this issue? I haven't been able to find many relevant articles when I google ".htc crossdomain" and such.

Also, btw, I've tried it without the ?128... query string (Shopify uses this as a cache-buster for updated files). That doesn't make a difference.

Thanks for your time.


Thu Aug 12, 2010 10:00 am
Profile WWW

Joined: Mon Jul 19, 2010 4:46 am
Posts: 34
Post Re: Accessing PIE.htc from a different domain than the host
From other comments on this forurm, I gather that HTC behavior files cannot be loaded cross-domain. Sorry to be the bearer of bad news.

I wonder if you could use the PHP (or some other) wrapper to re-locate it within your domain?


Thu Aug 12, 2010 10:23 am
Profile

Joined: Thu Aug 12, 2010 9:41 am
Posts: 2
Location: Berkeley, CA
Post Re: Accessing PIE.htc from a different domain than the host
Thanks for the reply. Yeah, it turns out you can't use .htc files on a different domain than the host document. Bummer.

Unfortunately I can't use the php wrapper with Shopify. I'll keep my eyes peeled to see if there's a pure-js alternative to the .htc file.


Thu Aug 12, 2010 12:23 pm
Profile WWW

Joined: Mon Jul 19, 2010 4:46 am
Posts: 34
Post Re: Accessing PIE.htc from a different domain than the host
jonwolfe wrote:
Thanks for the reply. Yeah, it turns out you can't use .htc files on a different domain than the host document. Bummer.

Unfortunately I can't use the php wrapper with Shopify. I'll keep my eyes peeled to see if there's a pure-js alternative to the .htc file.


Let us know what you find. Before PIE, I wasted a lot of time trying to find something suitable, but I every other solution I found has show-stopping problems.

As far as pure JS options go, the best I found are some JQuery solutions, but none of them completely worked for me.

I'm hoping that Jason will release a pure JS variant of the PIE HTC. I don't need it myself but I can see a few use cases where it would be good to have, and I don't suppose it would be too difficult for him (HTC files are just a wrapper for Javascript anyway).


Fri Aug 13, 2010 3:10 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post Re: Accessing PIE.htc from a different domain than the host
Yup a pure JS version is in the works. It'll have some downsides to it (e.g. no automatic attachment/detachment) so the HTC will remain the preferred approach, but it should be a good option for many people.

Tracked here: http://github.com/lojjic/PIE/issues#issue/19


Sat Aug 14, 2010 3:26 pm
Profile

Joined: Tue Feb 04, 2014 6:35 pm
Posts: 1
Post Re: Accessing PIE.htc from a different domain than the host
(Here is a MSDN page about this: "Introduction to DHTML Behaviors | Security".)


Tue Feb 04, 2014 7:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 3 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.