dify icon indicating copy to clipboard operation
dify copied to clipboard

ChatBt iFrame Load with delay (embed.min.js issue)

Open asrguru20 opened this issue 9 months ago • 2 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

install dify version newer than version 0.8.3 embed the chat iframe to the body of your site open the chat bot and after about 4 seconds chatbot windows appears to function

I also attached a video to see this issue, in the video First I embed the chat bot with embed.min.js version 0.15.3 testing the chat bot and it open up with delay but when I downgrade the embed.min.js to dify version 0.8.3 the chatbot bubble opens up instantly so this is the issue related to embed.min.js note : The delay is for both Page iframe and chat Bubble body iframe and also I noticed that Dify chatbot iframe In version 1.0.x has more delay

https://github.com/user-attachments/assets/b52784d9-0923-442c-ad6b-57c58a461fee

✔️ Expected Behavior

the chatbot in iframe mode should open up fast as you click on it

❌ Actual Behavior

the chatbot iframe for both Bubble and page embed mode appears with 3 to 4 seconds

asrguru20 avatar Mar 16 '25 09:03 asrguru20

I found a similar open issue regarding the delay in the Dify Chatbot iFrame display. The suggested solution involves several factors that could be causing the delay, such as configuration issues, script placement, network latency, asynchronous operations, and element creation and event handling. To reduce the delay, it is recommended to ensure the configuration is correct, optimize asynchronous operations, and check network conditions. Additionally, preloading resources or optimizing script execution order might help [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 16 '25 09:03 dosubot[bot]

this issue is important because of User Experience , most user do NOT wait enough for chatbot to appear they think it is not working so this can make Dify for those users who use it for their websites none sense

asrguru20 avatar Mar 16 '25 09:03 asrguru20