Expand my Community achievements bar.

SOLVED

Pre-hiding code snippet slowing down page load speed

Avatar

Level 2

Good Morning Everyone,

I have  a question regarding the pre-hiding code snippet which is required when deploying Target via Launch.  We had to remove the code snippet as it was causing a 3 second delay in page loads.  Has anyone ever come across this issue?  If so, how was it resolved?

Thank you very much,

Alex

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Alex,

 

Pre-hiding snippet is required when Launch is loaded asynchronously. Loading Launch asynchronously is a non-blocking approach. The timeout configuration (3 seconds) in the pre-hiding snippet is the maximum timeout for Target response. With the right implementation, Launch script is added to the page in the right location, page will be visible as soon as Target responds which is usually 400ms. My recommendation is to revisit the implementation and make sure that Launch is added in the correct location on the page. 

 

Thanks,
Bala

View solution in original post

9 Replies

Avatar

Employee Advisor

Hi @alexe58360872 

Have you tried minimising the timeout for prehiding snippet in launch?

 

Avatar

Level 2

Hi @Gaureshk_Kodag

We had to hard code the pre-hiding snippet as per Adobe documentation.  Is there another way we can deploy the code via Launch?

 

Thanks,

Alex

Avatar

Level 2

Hi @gaureshk3014423

Sorry, I misunderstood the question. Unfortunately, with our current operational set-up, we are not able to play with the timeout setting in the code on the fly. Another team manages the HTML.

Avatar

Correct answer by
Employee

Hi Alex,

 

Pre-hiding snippet is required when Launch is loaded asynchronously. Loading Launch asynchronously is a non-blocking approach. The timeout configuration (3 seconds) in the pre-hiding snippet is the maximum timeout for Target response. With the right implementation, Launch script is added to the page in the right location, page will be visible as soon as Target responds which is usually 400ms. My recommendation is to revisit the implementation and make sure that Launch is added in the correct location on the page. 

 

Thanks,
Bala

Avatar

Level 2
Hi @ben68. Thanks for your reply. Could you provide an example or best practice as to where the right place to add Launch on the page should be? Thank you very much in advance, Alex

Avatar

Level 2

Hi @ben68 ,

 

If Target loads faster, 400ms, does the pre-hiding snippet still wait 3 seconds, or does it recognize there is a response and stop?

 

Thanks.