Kent Brewster

Best of Fluent - Eight Simple Rules for Running Your JavaScript on My Page

Date: This event took place live on May 17 2013

Presented by: Kent Brewster

Duration: Approximately 60 minutes.

Cost: Free

Questions? Please send email to


Join us for an exclusive presentation by Kent Brewster and his talk from Fluent Conference 2012.

Third-party JavaScript widgets add functionality and enhance user experience to Web sites, with a very low perceived barrier to entry.

Appearances are deceiving, however. Since JavaScript runs with full access to the document, it must be tightly controlled to prevent it from defacing its surrounding page, stealing the reader's secrets, or otherwise interacting in an unpredictable fashion with its surroundings, which may include other third-party scripts or browser plug-ins.

To be covered in this talk:

  • including third-party scripts
  • passing configuration variables from the surrounding page to the included script
  • creating and inserting structural elements (HTML), styling (CSS), and behaviors (JavaScript)
  • avoiding interference with existing (and future) page elements
  • requesting and rendering data from external APIs
  • detecting and avoiding interference from other third-party scripts or outside manipulation

... all without increasing perceived load time, stealing event listeners, or creating visible global variables.

About Kent Brewster

You may already be running some of Kent Brewster's difficult-to-detect JavaScript, which powers portions of Yahoo's Pipes badges, Netflix's widgets, the badge, and Lexity's store instrumentation.

O'Reilly Fluent Conference