Toggle menu
24K
665
183
158.2K
HausaDictionary.com | Hausa English Translations
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 14:20, 29 April 2020 by Admin (talk | contribs) (Created page with "# #:''AMP components may have JavaScript under the hood, but they're carefully designed to make sure they don't c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. AMP components may have JavaScript under the hood, but they're carefully designed to make sure they don't cause performance degradation.
    Ɓangarorin AMP kan iya samun JavaScript a ƙarƙashin su, amma an tsara su ne da kula don tabbatar da cewa ba za su jinkirtar da gudanarwar aiki ba. [1]
  2. While custom JS is allowed in <a href="../documentation/components/reference/amp-script.md">amp-script</a>, and third-party JS is allowed in iframes, it cannot block rendering. For example, if third-party JS uses the <a href="http://www.stevesouders.com/blog/2012/04/10/dont-docwrite-scripts/">super-bad-for-performance document.write API</a>, it does not block rendering the main page.

    Duk da dai za a iya amfani da rubutun JS na kanka a cikin <a href="../documentation/components/reference/amp-script.md">amp-script</a>, kuma za a iya amfani da JS ɗin waje a cikin iframes, ba zai iya toshe fitowar shafi ba. Misali, idan JS ɗin waje yayi amfani da <a href="http://www.stevesouders.com/blog/2012/04/10/dont-docwrite-scripts/">super-bad-for-performance document.write API</a>, bai toshe fitowar babban shafin ba.
    1. Third-party JS likes to use synchronous JS loading.
    2. They also like to document.write more sync scripts.
    3. For example, if you have five ads on your page, and each of them cause three synchronous loads, each with a 1 second latency connection, you’re in 15 seconds of load time just for JS loading.
    4. AMP pages allow third-party JavaScript but only in sandboxed iframes.
    5. By restricting them to iframes, they can’t block the execution of the main page.
    6. Even if they trigger multiple style re-calculations, their tiny iframes have very little DOM.

Pages in category "AMP"

The following 3 pages are in this category, out of 3 total.