PROFESSIONALLY OPTIMIZED WEBSITES STARTING AT $995
Our team of SEO Web Design gurus are standing by to assist you achieve your online marketing goals.

+1-971-599-3330

REQUEST QUOTE
SEO Web Design, LLC aims to improve business by delivering effective solutions based on innovative technologies and professional designs. Discover the variety of services we offer and convince yourself on the basis of the latest works that we've done. We love building fresh, unique and usable websites optimized specifically for your niche.

Responsive Web Design

SEO / SEM / Social Media

Conversion Rate Optimization

Email Marketing

Online Presence Analysis

Web Hosting
Top
SEO Web Design, LLC / SEO  / You can now add custom JavaScript to AMP pages

You can now add custom JavaScript to AMP pages

Custom JavaScript can now be added to AMP pages, Google announced[1] this week. The amp-script component can be used to enable user interactions, and to share code across AMP-enabled and non-AMP pages.

Why we should care

The AMP team said this was one of the most requested features from developers using AMP. It enables web pages delivered via AMP to incorporate more of the interactivity features that JavaScript offers.

The amp-script component runs a page’s custom JavaScript in a separate Worker thread.

Prior to this update, AMP pages have been mostly static, which limited its uses and forced publishers to compromise features for speed and potentially visibility in mobile search results.

More on the news

  • The new amp-script component is compatible with React, Preact, Angular, Vue.js, jQuery and D3.js frameworks.
  • amp-script doesn’t change page content without user interaction, so it won’t modify your content upon page load.
  • The script within a single amp-script must be less than 150kB.
  • Not all APIs are supported inside a Web Worker; refer to WorkerDOM’s list of allowed APIs[2].

About The Author

George Nguyen is an Associate Editor at Third Door Media. His background is in content marketing, journalism, and storytelling.

References

  1. ^ announced (blog.amp.dev)
  2. ^ allowed APIs (github.com)

[email protected]

Search Engine Land is the leading industry source for daily, must-read news and in-depth analysis about search engine technology.

No Comments

Sorry, the comment form is closed at this time.