Forum Discussion
Hi Henrik,
With regard to the webUi context object and using it for URLs, that method is deprecated in favor of asset.get. I don't know the precise details on the differences between the two, but asset.get is the new best practice for static asset URLs. I would suggest switching all of your cases over to use the new method whenever you get a chance.
About adjusting URLs to use the CDN -- cache optimization is one way to get better end user performance, and using a CDN is another way. Our CDNs send the same cache headers that we send, so switching to the CDN will not help with the browser cache. But what it will do is reduce load on the community (which has the potential to improve overall experience for all users), and it will also let users download more assets faster, from servers close to their location (edge servers).
As I mentioned, we have different expiry behavior for different types of assets. For this situation where you are seeing an "Expires" header missing, this may be a case where we can improve. I encourage you to submit an idea to our product idea exchange because this would be a good feature enhancement for performance.