Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Later
-
6.15.0
-
None
-
None
Description
wicket-bootstrap has a IBootstrapSettings.useCdnResources() which is a great idea.
Wicket should adopt this setting in core. And when true, Wicket JS libraries such as jQuery should use public CDN.
This setting will default to true on DEPLOYMENT, and false for DEVELOPMENT (but of course, can be set to true programmatically).
wicket-bootstrap will then can use CDN settings from wicket core.
In addition, I would suggest a variant of JavaScriptResourceReference that also has an additional parameter for cdnUrl (which can be String for convenience or Url for strictness, up to you), e.g. :
public HowlerJavaScriptReference() { super(HowlerJavaScriptReference.class, "howler.js", "//cdnjs.cloudflare.com/ajax/libs/howler/1.1.17/howler.min.js"); }
its behavior will switch based on useCdnResources setting, and very easy and practical to code this way.
Attachments
Attachments
Issue Links
- is blocked by
-
WICKET-4942 Double slash '//' in starting url makes Url.parse output a relative Url
- Resolved
- relates to
-
WICKET-4466 Use an external host for the static javascript files (specially JQuery)
- Resolved
-
WICKET-4471 Generic registry of javascript/css resource references
- Resolved
- links to