You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Toby (JIRA)" <ji...@apache.org> on 2011/06/06 14:40:58 UTC

[jira] [Commented] (TAP5-1515) Support for external assets

    [ 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