활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
So client libaries are stored and cached in cq in /var/clientlibs.
Is there any way to serve these files from that directory?
For example we have client libraries with our components in our apps directory. Currently using client libraries we are including them from the place the components lives for example if i create a component under
/apps/test/myComponent
I then create a client library for this and place the client library include in my jsp.
CQ will cache this for me under /var/clientlibs/ but it will still serve them from the apps directory. Is there a way to make this be served from teh var directory instead in my html so it won't be blocked by the dispatcher?
Thanks in advance!
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Hi,
The correct way to handle that situation is to create a clientlib under /etc which embeds the clientlib under /apps.
조회 수
답글
좋아요 수
Hi,
The correct way to handle that situation is to create a clientlib under /etc which embeds the clientlib under /apps.
조회 수
답글
좋아요 수
Hi! Thanks for replying!
I understand totally what you are saying and I understand that concept. My problem is that we have a large number of applications and if we embed them in client library categories in our etc folder then we will get more css and js than we really need or we would have to create a client library for every one of the components we have that has css and js that must be isolated to that component (for example have a single page with one component on it). Is there any way to serve them from the /var/client libs at all?
조회 수
답글
좋아요 수
Hi,
It sounds like you've overengineered this a bit. Your are better off (both in CQ and in general) serving fewer JS/CSS files, even if those files contain rules which don't apply on specific pages. If you're using minification and gzipping (which you should be), the additional rules/code are trivial in length compared to the network roundtrip of fetching them separately. Most of the time, my projects use a single end-user facing client library (which might embed some other libraries of course). It is the relatively rare case where a separate library is necessary. Of course, every project is different, so YMMV.
So I would create one library in /etc which embeds all the other libraries. And then just reference that library in your JSP code.
Justin
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
Likes
답글
조회 수
Likes
답글