SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • August 6, 2025
  • Rss Fetcher

Stephen and Chris hop on to talk about how we’re saving everyone from crashed browser tabs in CodePen’s 2.0 editor. One simple:

while(true) { }

Executing JavaScript can cause a browser tab to entirely lock up, preventing you from doing anything, like potentially saving your work. It can even crash other same-domain tabs. But not on our watch! CodePen is now using a “heartbeat” technique to report up from the preview iframe to the parent page, and if we don’t hear the heartbeat, we can rip out the iframe and stop the crash. But it was very tricky to get working and not too jumpy.

Fortunately, we got it all working, because our previous technique of instrumenting your JavaScript wasn’t going to scale well to the 2.0 editor.

Time Jumps

  • 00:05 404 error
  • 00:45 Dealing with infinite loops for the new editor
  • 02:48 What happens when a browser tab freezes?
  • 06:51 Why instrumenting worked
  • 09:24 Alex’s heartbeat solution
  • 14:59 How the UI works
  • 19:10 Dealing with JavaScript alert, confirm, and prompt messages
  • 20:34 Dealing with tab visibility
Previous Post

Recent Posts

  • 404: Preventing Infinite Loops from Crashing the Browser
  • How to actually raise a seed round: Actionable advice from top investors at TechCrunch Disrupt 2025
  • First impressions of Alexa+, Amazon’s upgraded, AI-powered digital assistant
  • Google takes on ChatGPT’s Study Mode with new ‘Guided Learning’ tool in Gemini
  • OpenAI is practically giving ChatGPT to the government for free

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.