Iplagi ye-AMP ngenkxaso yeekhowudi zayo zeJavaScript

Umenzi wenkunkuma oKhawulezayo wamaPhepha (i-AMP) yokwenza amaphepha e-Google AMP , iiplagi ze-AMP kunye ne- AMPHTML yomenzi wethegi yokuxhasa ukwamkelwa kweyakho iJavaScript.


Isibhengezo

Dibanisa iJavaScript ethile


extension

Imibhalo yakho yeJavaScript kunye nomxholo we-Iframe unokusetyenziswa kuphela kumaphepha e-AMP phantsi kweemeko ezithile.

Ikhowudi yakho yeJavaScript inokufakwa kuphela kwi-AMPHTML ukuba ifakwe nge-iframe.

Iframes in AMPHTML wiederum (via '‪‎amp-iframe‬'-Tag) akzeptieren nur Inhalte, die über eine verschlüsselte ‪‎HTTPS‬-Verbindung verfügen.

Ukuba ufuna ukusebenzisa eyakho iJavaScript kwi-AMPHTML, kuya kufuneka ubabonelele ngoqhagamshelo lwe-HTTPS kwaye emva koko ubadibanise kwiphepha eliphantsi lewebhusayithi nge-Iframe, ukuze i-Accelerated Mobile Pages Generator ikwazi ukwamkela eyakho iJavaScript kwaye uyijike 'Amp Guqula -iframe' iithegi kwaye uzidibanise kwiphepha le-AMP.

Umvelisi we-AMPHTML uyazibona iiframes ezidityanisiweyo (kubandakanya iJavaScript), aziguqulele kwiithegi ze-'am-iframe 'ezihambelanayo, kwaye enze ezakhe iiJavaScript eziqulethwe kuzo kuhlobo lwe-AMP.

Sebenzisa eyakho iJavaScript kwi-AMPHTML, kufuneka kuhlangatyezwane nale miqathango ilandelayo:

  • IJavaScript yakho kufuneka ifikeleleke phantsi kwe-HTTPS
  • IJavaScript yakho kufuneka ifakwe kwi-iframe

Isibhengezo