Running only asynchronous scripts

Explore discuss data innovations to drive business efficiency forward.
Post Reply
anglehimu
Posts: 133
Joined: Sun Dec 22, 2024 4:37 am

Running only asynchronous scripts

Post by anglehimu »

While rendering pages, you will not notice any slowdown or jerkiness in navigation, because all loading will be simultaneous and the first script that draws on resources will make them available in the cache for all subsequent ones.

Static reduction of resources in loading
Everything that remains external to our project must necessarily have its dimensions explicitly stated in the HTML source so that AMP can already have everything available (before each one is downloaded during navigation) and the benefit of our ios database prepare the right layout.
All CSS must be "inline" and size-related
Embedding style sheets in pages eliminates calls to external files and decreases display times. In CSS, element sizes must be declared and all selectors that we already know "take" too long to load must be removed.

Prioritize resource loading
AMP provides, when downloading resources, to prioritize those that it deems most important, including them first in the TO-DO list if, for example, they are present among the Above the Fold contents mentioned above or if the user can immediately have quick and easy access to them.

And after the good news, the disadvantages… At least the most visible ones
The first and most obvious for those in the know is the one related to monetization through advertising banners . Many portals, for example, tend to have agreements with advertising agencies for the display, in more or less visible spaces, of sponsored banners of different formats and characteristics.
These banners are (usually) managed by JavaScript files owned by third-party domains , which refer to the external resources of those who provide them to be manipulated and controlled.

AMP, by its nature, needs to load scripts asynchronously and therefore, having to deal with external resources that can intervene in the clean loading and in the general policies of the structure of the "accelerated" pages themselves, it is not possible to guarantee the correct result in the display of these advertisements.
Post Reply