Hi all,
Can someone suggest me how to cache the HTML5 renditions of a form that is stored under /formsanddocuments in dispatcher? Since the rendition URL looks "http://localhost:4503/content/dam/formsanddocuments/Sample_Test.xdp/jcr:content", Does it mean it should be cached under /content/dam/formsanddocuments ? I could not find any. Is this implementation even possible? i was hoping to cache frequently rendered HTML5 versions and serve them through dispatcher
Thanks,
Abhishek
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@kolluax you can't cache files without extensions.. please refer to Aem adobe documentation as below
Specifying the Documents to Cache
The /rules property controls which documents are cached according to the document path. Regardless of the /rules property, Dispatcher never caches a document in the following circumstances:
Request URI contains a question mark (?).
Indicates a dynamic page, such as a search result that does not need to be cached.
The file extension is missing.
The web server needs the extension to determine the document type (the MIME-type).
The authentication header is set (configurable).
If the AEM instance responds with the following headers:
no-cache
no-store
must-revalidate
Views
Replies
Total Likes
@kolluax you can't cache files without extensions.. please refer to Aem adobe documentation as below
Specifying the Documents to Cache
The /rules property controls which documents are cached according to the document path. Regardless of the /rules property, Dispatcher never caches a document in the following circumstances:
Request URI contains a question mark (?).
Indicates a dynamic page, such as a search result that does not need to be cached.
The file extension is missing.
The web server needs the extension to determine the document type (the MIME-type).
The authentication header is set (configurable).
If the AEM instance responds with the following headers:
no-cache
no-store
must-revalidate
Views
Replies
Total Likes
Hi @kolluax ,
If you use AEM Dispatcher to cache adaptive forms, it also caches adaptive form which contains forms with pre-filled data.
If such forms are served from AEM Dispatcher cache, it may lead to serving pre-filled or stale data to the users.
So, use AEM Dispatcher to cache adaptive forms which do not use pre-filled data. Moreover, a dispatcher cache does not auto-invalidate cached fragments. So, do not use it to cache form fragments.
Adaptive forms and HTML5 forms render in HTML5 format.
The resultant output could be large depending on factors like the form size and images in the form.
To optimize the data transfer, the recommended approach is to compress the HTML response using the web server from which the request is being served.
This approach reduces the response size, network traffic, and the time required to stream data between server and client machines.
Please follow below link for more details on it:
https://github.com/AdobeDocs/experience-manager-64.en/blob/main/help/forms/using/configure-adaptive-...
Hope it helps.
-Tarun
Views
Replies
Total Likes
Thank you @TarunKumar @Shashi_Mulugu , both your responses helped me figure out the way forward. I will explore compressing the HTML response option.
For HTML5 forms use case, may I know what the best practice is to serve the forms?
1. should we use the Forms portal component and host the forms
2. expose the HTML5 endpoint that gives back the HTML body as response
3. Upload the XDP into forms and documents and then provide the direct links to access them as HTML/PDF
Thanks,
Abhishek
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies