"Slow" custom code js loading, please advise

Dear all,

My name is Alex, hello! Sry for my English in advance, but i’ll try to explain my question :slight_smile:
have a question regarding the following issue:

have webpage of travel agency
here’s page example (tour landing page)

that’s what gtmetix shows:

as far as I understand, the page speed is lower by the “bokun” widget (bokun = tours selling platform)

when i delete widget, gmetix looks like this

the question is:
are there any way to delay widget loading,do it after page loading itself?
this is a very convenient\cool widget and I do not want to lose\delete\hide it
or what are the options to speed up load speed?

unfortunately my skills and logic are absolutely not enough in this situation
coding skills are zero…)

Thank you in advance!

Hello @Psimorph

Is the JS code in the footer custom code section?



nope, in the body


1 Like

I’m not so good when we talk about JS :smile: You have a script in your too right? Something like < script src=“https:// widgets.bokun.io / assets / javascripts / widgets / embedder . js”>


I can see your script is in your head code. Try moving it to the bottom of your body (put it in the footer code which is in your site wide settings).

See if this helps as a start. If not, we could potentially look at a way to delay the script’s execution depending on other circumstances.

  • This picture is very big (Use tinyjpg) - for this and for other images

  • put js before body

  • You load a lot of fonts so also check this

  • I never use bokun - but you load 6 diff scripts for this libary (Combine the code or read the docs to find solution)

Anyway - Add read-only link (its hard to read the minify code)

Dear Jasondark,

thanks for your reply
But no, unfortunately it did not help