Java can operate AMP documents with support of AMP-script.

java script

Java- Google announced a new feature is that custom JavaScript can now be added to AMP pages to operate in an efficient and interactive manner. It can be used to enable user interaction and to share code to operate AMP-enabled and non-AMP pages with the use of amp – script component. Google said, multi-page forms that need confirm to move on next section, now can enable with AMP.

The AMP team revealed that this feature was the most in demand from developers using AMP. The incorporation of more interactivity offered by JavaScript allows can now be enabled for web pages delivered via AMP. The custom JavaScript on a page can be run by the amp- script component in a separate worker thread. In mobile search results, AMP pages are more stable for publishers in speed and potentially visible in Java

Improved features in AMP pages for JavaScript offers

  • The new AMP-script is component has a compatibility with React, Preact, Angular, Vue.js, jQuery and D3.js frameworks.
  • A single amp-script size must be less than 150kb.
  • amp-script won't change page content upon page load without user interaction.
  • Most APIs are not supported in Web Worker.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.