Mantys Core

JavaScript

Delayed, deferred and third-party scripts: why they break menus, forms and consent banners, and how to find the one at fault.

JavaScript · 9 min

Delay JavaScript execution broke my site: how to find the script at fault

Delaying JavaScript breaks a site in five mechanical ways (a missing dependency, a page event that already fired, a first click swallowed, a chain stuck on one script, a visitor never counted), and each one leaves a signature you can read in the browser, so you can exclude one script instead of switching the whole option off.

JavaScript · 8 min

How to make Axeptio load faster (without breaking consent)

An Axeptio banner rarely arrives late because of Axeptio itself, it arrives late because its chain of requests (settings, SDK, project configuration, font) queues behind everything else the page loads, so the fixes are to lighten the competition, never delay the consent tool, load it early, drop the font you do not use, and customize it without fighting its markup.

JavaScript · 8 min

How to choose a theme, and spot the ones that ship one giant JavaScript file

Before your first line of content, your theme decides what a browser must download, parse and run. The single choice that weighs most is how it ships its JavaScript: one splittable set of small files, or one giant block that pins the whole page to its slowest part.

JavaScript · 5 min

Why does my burger menu only open on the second click?

If you turned on a JavaScript delay (loading scripts on the first click or after a timer), the very first tap on the burger wakes up the script loading, it does not open the menu. The menu only responds to the second tap. The fix: isolate the menu script and its dependencies out of the delay, or better, give it a vanilla menu with no dependency.

My AccountGet License →