Reference to own resourcen via external URL
-------------------------------------------
Key: TAP5-1276
URL: https://issues.apache.org/jira/browse/TAP5-1276
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.0.19, 5.0.18, 5.0.17, 5.0.16, 5.0.15, 5.1.0.7, 5.1.0.6,
5.1.0.5, 5.1.0.4, 5.1.0.3, 5.1.0.2, 5.1.0.1, 5.1.0.0, 5.2.0
Reporter: Toby
Priority: Minor
Many websites with high traffic deliver static content such as CSS, JS or
images using a CDN (content-delivery network) such as Akamai, Limelight,
Level-3,CDNetworks etc...
The principal is simply.
static,domain.com is pointing to the CDN. The CDN requests the resources from
the origin server such as www.domain.com or static-origin.domain.com and the
end-user will access it via the CDN cache through static.domain.com.
If Tapestry should actively support the integration of CDNs, it should be
possible to use the standard components to reference resources externally.
If Tapestry checks for the existence of resources or reads them for generating
packages files (e.g. combine all JS or CSS files to one), it can do it locally
- however the final URL should be absolutely reference by the CDN URL that can
be configured.
Example:
@Inject
@Path("context:images/tapestry_banner.gif")
private Asset banner;
Could be extended to:
@Inject
@Path("cdnContext:images/tapestry_banner.gif","http://static.domain.com/");
private Asset banner;
Alternatively it could be a global parameter to overwrite the URLs by adding an
external domain for delivering CSS, JS or images.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.