[ 
https://issues.apache.org/jira/browse/TAP5-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044819#comment-13044819
 ] 

Toby commented on TAP5-1515:
----------------------------

The solution should also take care of files delivered by Tapestry.

Example:

Origin Server URL is: www-origin.example.com/js/somefile.js
End-User URL is: www.example.com/js/somefile.js

So Tapestry needs to change the Server URL of the resource, the path needs to 
stay the same.

The CDN takes care of fetching and delivering the file.

In the case of "fixed" resources such as jquery hosted by Google, the same 
mechanism/annotation should be used.

The example above should be a simple use-case.

Simple Case:

@Import(cdn = { 
"uri:https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"; })

Own CDN Case:

@Import(cdn = { "domain:http://cdn.domain.com/"; })


> Support for external assets
> ---------------------------
>
>                 Key: TAP5-1515
>                 URL: https://issues.apache.org/jira/browse/TAP5-1515
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core
>            Reporter: Hugo Palma
>
> It would be great if an external asset (url based) could be referenced from 
> Tapestry. For example, i may want to include a CDN asset in an Import 
> annotation in a component.
> One resolution suggestion would be to introduce an "uri" prefix, something 
> like:
> @Import(library = { 
> "uri:https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"; })

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to