Thanks for your Answer Eric.

But, we do not use a CDN.

What we tried in our specific project was to modularize our applications in 
a way that specific Polymer elements are delivered by dedicated servers (so 
they have a dedicated URL).
A kind of dashboard imports these elements to provide a common/combined UI.

Anyway, I see that there is no way to do this, except to use full URLs for 
import or do some kind of build step.

best Christopher


Am Montag, 23. Februar 2015 17:49:26 UTC+1 schrieb Eric Bidelman:
>
> The short answer is you can't use a CDN. CDNs are a hole in the HTML 
> Imports story atm.
>
> Imports need to resolve to the same URL to be de-duplicated correctly by 
> the browser. Serving the same component from two different URLs won't be 
> deduped properly. This is why we recommend bringing in components locally 
> using Bower and serving them from your own setup.
>
> IMO, this is one of the biggest issues Polymer and the standards process 
> needs to solve. It prevents the most convenient reuse of components.
>
> A bit more info here: 
> https://www.polymer-project.org/resources/faq.html#is-the-code-hosted-on-a-cdn
>
>
> On Mon Feb 23 2015 at 12:46:13 AM <[email protected] <javascript:>> wrote:
>
>> ServerB defines an element like this:
>>   <link rel="import" href="../core-menu/core-menu.html">
>>   <polymer-element name=„elementB“….</polymer-element>
>>
>> ServerA serves the index.html, which uses element B like this:
>>   <link rel="import" href="../core-menu/core-menu.html">
>>   <link rel="import" href="http://serverB.com/elementB.html";>
>>   ...
>>   <elementB></elementB>
>>   ...
>>
>> The issue is, that HTML import adds a hostname to the imports at ServerB. 
>> So core-menu.html will be imported twice with two different URLs. This 
>> results in an polymer „element already registered“ exception.
>>
>> I think using elements from different URLs pr server is a usual use case, 
>> right. 
>> So, what is the correct way to handle this?
>>
>> We got around this by adding a polymer element server and write <link 
>> rel="import" href=„http://myPolymerServer/core-menu/core-menu.html“>. 
>> But thats not very convenient.
>>
>> best Christopher
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/980b43a8-48d8-4760-97f5-100c0f8f230e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/polymer-dev/980b43a8-48d8-4760-97f5-100c0f8f230e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/af3636ce-8f97-4f40-8682-988b3d09aa05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to