Iplagi ye-AMP ngenkxaso yeekhowudi zayo zeJavaScript

I-Accelerated Mobile Pages (AMP) umvelisi wokwenza amaphepha e-AMP kaGoogle , iiplagi ze-AMP kunye ne- AMPHTML tag generator zixhasa ukwamkelwa kweJavaScripts yakho.


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 kwi-AMPHTML (ngethegi ye-'amp-iframe') yamkele kuphela umxholo onoqhagamshelwano oluntsonkothileyo lweHTTPS.

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