I've developed a JSLink template that works fine. I've tested it with authenticated and anonymous access and it works flawlessly. The problem that i'm seeing is that when I open the page with the LVWP and custom JSLink template as an anonymous user in the morning sometimes I don't see my custom rendering. What is more odd is that my custom JSLink script is not even requested or downloaded.

If I authenticate and refresh the page close the browser and come back in as anonymous the rendering is done as my custom rendering as expected. This behavior is bizarre, has anyone else seen this or figured out how to solve it? In the meantime I've turned off data view caching on the web-part, but I would like to turn this back on.


So after some further investigation it seems that this issue is being caused by a combination of the search crawler hitting the page first and page output caching for anonymous users. I say this because I viewed the source for the page view instance that wasn't performing my custom rendering and in the html I saw this:

<html dir="ltr" class="ms-isBot" lang="en-US">

I fired up the ILSpy to see what is going on in the XSLTListViewWebpart and there is a line in there that bypasses all client rendering script registrations based on this:


I need to have page output caching enabled for performance, it's essential for this public facing site. So now it seems the only solution I have left is to exclude all pages where we have any rendering template customization's from being crawled. This is obviously not an ideal solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.