SPA implementation - initial page load - flicker | Community
Skip to main content
May 14, 2022
Solved

SPA implementation - initial page load - flicker

  • May 14, 2022
  • 1 reply
  • 1186 views

I have the following rule in Launch for initial page load for a SPA.

 

Load Target library  > set parameters > Fire page load request > trigger view

 

I am getting flicker on the experience... I presume this is because the VEC is targeting content based on the view but I have that initial page load request being sent first prior to the trigger view.

 

In the Target documentation - https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementation/deploy-at-js/target-atjs-single-page-application.html?lang=en#order-of-operations-for-initial-page-load

 

Step 3: Execute Target request

Step 4: Call trigger view()

 

Because the Target request you initiated in Step 3 could return experiences for both Page Load execution as well as Views, ensure that triggerView() is called after the Target request is returned and finishes applying the offers to cache. You must execute this step only once per view.

 

Is this suggesting I don't call triggerView() on page load until the Target request is complete? If so, what success event should I be looking for to know the offers are in the cache?

 

Would this not still cause flicker?  For example:

 

1. Target request sent 

2. Target returns no experience and page renders

3. triggerView() sent 

4. Page updates with cached experience?

 

Thanks 

 

 

 

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by RJBu

I was able to fix this by setting the "bodyHidingEnabled" config option to false

 

https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementation/functions-overview/targetgobalsettings.html?lang=en 

1 reply

RJBuAccepted solution
May 23, 2022