Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adding ResourceType along with nocache.html in Sling dynamic include

Avatar

Level 2

 

I configured   SDI of javascript type using  https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/development/set-up-sling...

 

Dillibabu77_0-1661276278105.png

 

When I access the page, the code of that component is written as:

 

<script type="text/javascript">
jQuery.get("\/content\/global/en/about-us/news/_jcr_content/root/responsivegrid/news.nocache.html/sample/components/content/news.htmll",
function(data) {
jQuery("#dynamic_include_filter_div_1000").replaceWith(data);
});
</script>

 

.nocache.html/resource type/pagename

resource type is sample/components/content

 

I don't know why the resource type is appended with .nocache.Html.

 

Has anyone faced this issue previously?

 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Dillibabu77 ,

You are seeing the resource type is appended with .nocache.html because you have configured Filter Selector = nocache.

Along with the SDI configuration, we also need to do the following configuration on the dispatcher's side.

  1. Enable Include module in httpd.conf (LoadModule include_module modules/mod_include.so).
  2. SetOutputFilter as INCLUDES in httpd.conf
        <IfModule dispatcher_module>
            SetHandler dispatcher-handler
        </IfModule>
        SetOutputFilter INCLUDES
  3.  Add Includes option to Options directive
        <Directory />
            Options FollowSymLinks Includes
            AllowOverride None
        </Directory>
  4. Disable the caching for .nocache.html files in dispatcher.any at the end of the /rules section.
        /disable-nocache
        {
            /glob "*.nocache.html*"
            /type "deny"
        }

Sling Dynamic Include Github Reference - https://github.com/wttech/Sling-Dynamic-Include 

Hope this could help you !!!

Thanks

Shiv

 

View solution in original post

4 Replies

Avatar

Level 9

SDI appends nocahe.html which is identified at dispatcher level to avoid caching the HTML. Below is the rule added at dispatcher level.

{
    /glob "*.nocache.html*"
    /type "deny"
}   

Avatar

Correct answer by
Level 4

Hi @Dillibabu77 ,

You are seeing the resource type is appended with .nocache.html because you have configured Filter Selector = nocache.

Along with the SDI configuration, we also need to do the following configuration on the dispatcher's side.

  1. Enable Include module in httpd.conf (LoadModule include_module modules/mod_include.so).
  2. SetOutputFilter as INCLUDES in httpd.conf
        <IfModule dispatcher_module>
            SetHandler dispatcher-handler
        </IfModule>
        SetOutputFilter INCLUDES
  3.  Add Includes option to Options directive
        <Directory />
            Options FollowSymLinks Includes
            AllowOverride None
        </Directory>
  4. Disable the caching for .nocache.html files in dispatcher.any at the end of the /rules section.
        /disable-nocache
        {
            /glob "*.nocache.html*"
            /type "deny"
        }

Sling Dynamic Include Github Reference - https://github.com/wttech/Sling-Dynamic-Include 

Hope this could help you !!!

Thanks

Shiv

 

Avatar

Level 2

I have done this configuration already.Before SP13, url was   .nocache.html  .

After s913, url changed to /resource type/.

Avatar

Community Advisor

hi @Dillibabu77 

experienceleague.adobe.com/docs/experience-manager-learn/foundation/development/set-up-sling-dynamic-include.html?lang=en

 

Please go through the video available on the above page for detailed setup /configuration for SDI setup/management/