We have a CMS, which constructs page out of components. Each component is having inline script to trigger XHR call to get content based on personalization. At a high level CMS generates structure like below
<html>
<body>
<!-- First component -->
<div class='component container'>
<script>
//XHR Call gets personalized content
</script>
<div>Content placeholder</div>
</div>
<!-- Second component -->
<div class='component container'>
<script>
//XHR Call gets personalized content
</script>
<div>Content placeholder</div>
</div>
<!-- Third component -->
<div class='component container'>
<script>
//XHR Call gets personalized content
</script>
<div>Content placeholder</div>
</div>
<body>
<html>
From performance perspective, how to check if the parent div of script is above the fold or not without a plugin, trigger the XHR call based on that as user scrolls. There are some plugins like jQuery Lazy, but this might need heavy customization in CMS.