Logo

    10 Nifty Browser APIs

    enMay 11, 2022
    What browser API was discussed for enhancing accessibility?
    Who are the hosts of the Syntax podcast?
    What is session storage's role in web development?
    How can XLR cables improve professional monitor setups?
    What does FreshBooks offer to businesses according to the podcast?

    • Relatable experiences and browser APIsThe hosts shared their experiences while discussing ten useful browser APIs, enhancing web development with features like geolocation, notifications, and offline support.

      The hosts of the Syntax podcast, Scott Talensky and Wes Bos, shared their experiences of recent life events while discussing ten nifty browser APIs. Wes expressed his excitement over finally owning a dishwasher after hand washing dishes for months, while Scott shared his accomplishment of safely cutting down a tree that was growing dangerously close to power lines. Throughout the episode, they were sponsored by Prismic, LogRocket, and FreshBooks. The discussion then shifted to the topic of browser APIs, which are capabilities that allow developers to access features of the web browser without the need for additional plugins. These APIs can make web development more efficient and add unique functionalities to websites. Despite starting the podcast without discussing olive oil, as a listener had mentioned, the hosts still managed to incorporate it into the conversation, with Wes sharing his recent outdoor projects. Overall, the podcast episode showcased the hosts' relatable experiences and their expertise in web development.

    • Accessing user devices and local files with APIsGet User Media API enables webcam and microphone access, while File System API grants read/write access to local files and directories, expanding web development possibilities.

      The Get User Media API and the File System API are powerful browser technologies that offer developers unique capabilities to build innovative web applications. The Get User Media API allows access to user devices such as webcams and microphones, enabling fun projects and practical applications like building a Zoom competitor or applying effects to webcam feeds. The File System API, on the other hand, grants access to read, write, and modify files and directories, making it possible to build local file editors, SVG editors, and more, all without requiring users to download new files or zip folders. These APIs expand the possibilities for web development and invite creators to explore new, engaging projects beyond the typical practical applications.

    • Accessing File System and Geolocation APIs in JavaScriptJavaScript's File System and Geolocation APIs enable developers to read, write, and explore files, as well as access user location data in web applications, primarily in Chromium-based browsers.

      The File System API is a powerful tool for reading and writing files directly from a user's file system using JavaScript, particularly in Chromium-based browsers. It allows developers to create file editors, explorers, and other applications that can interact with the file system in a user-friendly way. The process involves using a file picker function to access the file or directory handle, which can then be used to read, modify, and save files. However, it's important to note that this API has limited compatibility, being only supported in Chromium-based browsers and with some limitations in Safari. Additionally, the security implications of granting websites access to a user's file system are significant, which is why it's mostly used in sandboxed environments like Electron apps. Geolocation API, another long-standing HTML5 browser API, allows developers to access a user's geographic location using latitude and longitude coordinates. It's widely supported across various browsers and can be used to build location-based applications and services.

    • Ask for location data when necessaryWebsites should only ask for user location data when it's necessary, such as when a user is looking for a nearby store. Use a headless CMS for efficient website creation and growth, but be aware of limitations with the permissions API.

      While automatically obtaining user location data can be convenient for websites, asking for permission to access it right away can be intrusive and uncomfortable for users. Instead, websites should only ask for location data when necessary, such as when a user is looking for a nearby store. Additionally, the use of a headless CMS like Prismic can make website creation and growth more efficient by allowing users to assemble pages using reusable data components called slices. However, the permissions API, which is used to check if a website has permission to access certain features like notifications or the clipboard, has limited support and can be inconsistently implemented across different browsers. Therefore, it's important for developers to consider the user experience and the limitations of various APIs when designing and building websites.

    • Requesting user permissions in web developmentWhile the Permissions API allows for requesting user permissions in JavaScript, inconsistent support across browsers and inability to change user decisions can pose challenges for developers.

      The Permissions API in web development offers a way to request user permissions for various features directly from JavaScript in the browser. However, support for this API is not consistent across all browsers, and if a user denies a permission request, there is usually no programmatic way to change that decision. This can lead to frustration for both developers and users, especially on mobile devices where users only have one chance to grant access to a specific feature. Despite the limitations, the Permissions API is an important tool for web developers, and its widespread support in Chrome and Android is a step in the right direction. However, the lack of consistent support in other browsers like Firefox and Safari can make development more challenging. It's important for developers to be aware of these limitations and plan accordingly when using the Permissions API.

    • Web Animations API and Resize Observer API: Dynamic Web Design SolutionsThe Web Animations API enables complex animations, while the Resize Observer API monitors element dimensions, enhancing web design functionality and user experience

      The Web Animations API is a JavaScript method for constructing animations without delving into CSS animations or transitions. It offers the ability to play, pause, reverse, update, and control playback rates. However, it can be cumbersome to use directly and doesn't have the capabilities of more advanced libraries like Framer Motion or Svelte animation. The Resize Observer API, on the other hand, is a favorite for monitoring changes in an element's width or height, as well as its position on the browser window. It's a powerful tool for creating responsive designs and can be used on personal websites, like in the speaker's own experience. Overall, while both APIs have their unique strengths and limitations, they provide valuable solutions for creating dynamic and interactive web experiences.

    • Learn about real-time element size handling with Resize Observer APIResize Observer API lets developers react to changes in element sizes in real-time, improving video player adjustments and more. Use it alongside Container Queries API for container and child handling. Error handle with LogRocket for debugging.

      The Resize Observer API is a powerful tool for developers to react to changes in the size of elements on a webpage in real-time. Previously, developers had to use workarounds like media queries or checking for window resizes to achieve similar functionality. However, the Resize Observer API allows for more precise and efficient handling of element dimensions. For instance, it can be used to adjust the size of a video player when the list of videos next to it is resized. The implementation is straightforward, with minimal code required. While there are performance considerations, the benefits of using Resize Observer outweigh the potential drawbacks. Another mention was the Container Queries API, which is similar to Resize Observer but focused on the container element rather than the child element. Both APIs can be used for various purposes, such as checking if an element is on the screen or triggering actions based on element dimensions. The discussion also touched on the importance of error handling when working with new APIs. LogRocket was suggested as a helpful tool for debugging issues and understanding user experience, especially when dealing with browser errors or unsupported features. Lastly, the Clipboard API was introduced as a simple yet powerful tool for copying and pasting text and images. It's widely supported in modern browsers and can be used for various use cases, such as implementing a copy-to-clipboard button or creating a rich text editor.

    • Navigator Clipboard and Web Storage APIs for Text ManipulationThe Navigator Clipboard API enables programmatic copying and pasting of text with user permission, while the Web Storage API offers local and session storage for text data.

      The Navigator Clipboard API and Web Storage API are powerful tools for web developers, allowing them to read and write text to the clipboard and store data locally or sessionally, respectively. The Clipboard API, with functions like `navigator.clipboard.readText()` and `navigator.clipboard.writeText()`, enables programmatic copying and pasting of text with user permission. The Web Storage API, consisting of local and session storage, offers a key-value store for text data, with local storage retaining data even after the browser or tab is closed. The session storage, on the other hand, is temporary and gets deleted when the tab or browser session ends. These APIs can be used for various purposes, such as creating a coupon dashboard with programmatically copying coupon codes, or implementing a paste function with permission prompts. While the Clipboard API can read text from the clipboard, it cannot determine if there is something specific in it without further processing. The Web Storage API, being a text-only storage, requires JSON encoding for storing non-text data. Overall, these APIs add significant functionality to web development, enhancing user experience and enabling new features.

    • Exploring New Web Technologies: Wipe Sequences, Session Storage, Web Storage, and Speech SynthesisWipe sequences ensure consistency across libraries, session storage can be frustrating but web storage offers a solution, FreshBooks is a cloud accounting solution for businesses, and speech synthesis is an easy-to-use browser API for various purposes

      Web technologies continue to evolve and offer new functionalities that can enhance user experiences. During this discussion, we touched on a few such technologies, including wipe sequences, session storage, web storage, and speech synthesis. Firstly, not all libraries support wipe sequences, which can be useful for clearing a video or canvas element. This is a good use case for ensuring consistency across different libraries. Secondly, session storage is a topic of debate, as some may find it frustrating when websites do not allow opening a new tab while logged in. However, web storage offers a solution as a local database for storing data, which can be particularly useful for maintaining form data. Thirdly, FreshBooks was introduced as a sponsor and discussed as a cloud accounting solution for businesses, offering features such as invoicing, expense tracking, and tax remittance. Fourthly, speech synthesis, or text-to-speech, was highlighted as an easy-to-use browser API that can be employed for various purposes, such as creating a dance app that shouts dance moves or enhancing accessibility for users with visual impairments. Overall, these technologies demonstrate the ongoing advancements in web development and the opportunities they present for creating innovative and user-friendly applications.

    • Text-to-speech and Speech-to-Text functionalities of Web Speech APIWeb Speech API offers text-to-speech (Voice Synthesis) and speech-to-text (Speech-to-Text) functionalities, enhancing user experience and engagement in web apps. Supported in popular browsers, these features enable personalized and intuitive interactions.

      The Web Speech API offers two powerful functionalities: speech synthesis (text-to-speech) and speech recognition (speech-to-text). These features can significantly enhance user experience and engagement in web applications. Text-to-speech, also known as Voice Synthesis, is supported in various browsers except for Opera Android, WebView Android, and Internet Explorer. It allows developers to create voice-enabled applications, where users can interact with the system using simple text input. The API supports multiple voices, pitches, and tones, making the experience more personalized and fun. On the other hand, speech recognition, also known as Speech-to-Text, is the opposite of text-to-speech. It converts spoken words into text, enabling users to interact with applications using their voice. This feature is supported in popular browsers like Chrome, Edge, and Safari. Developers can set up grammars, languages, and continuous recognition, making the user experience more seamless and intuitive. Both functionalities have various applications, from simple games to more complex applications like voice assistants and accessibility tools. By leveraging these features, developers can create more engaging and inclusive web experiences for users.

    • Exploring APIs and preserving mediaExploring APIs can lead to exciting discoveries and preserving old media formats requires affordable tools like RCA-to-HDMI converters or official Apple adapters.

      Exploring various APIs can be an enriching experience, especially when attempting to build examples in each one. While many APIs require a local server and SSL certificate for functioning, they will not work on HTTP. Old media formats like VHS and mini DV tapes can be digitized using affordable devices like the $15 RCA-to-HDMI converter, which has saved the speaker from the hassle of dealing with outdated technology like FireWire. However, some apps and devices may have copy protection that prevents HDMI output, making the official Apple adapter a necessary investment for such tasks. Overall, delving into different APIs and utilizing the right tools can lead to exciting discoveries and the preservation of cherished media.

    • Dealing with Inconsistent TechnologyTechnology can present challenges, but finding reliable and cost-effective solutions can make a big difference.

      Technology can be unpredictable and frustrating at times. The speaker shared an experience of dealing with inconsistent HDMI inputs for projectors, where some would work and others wouldn't. This issue was so pervasive that they had to go through multiple units to find one that worked. The speaker also talked about their experience with LED pot lights, which they found to be a simple and cost-effective solution for brightening up spaces. Despite the benefits, technology can still present challenges, as seen with the inconsistent HDMI inputs, but finding reliable and cost-effective solutions can make all the difference. The speaker's experience with both the frustrating and effective uses of technology highlights the importance of perseverance and adaptability when dealing with technological issues.

    • Navigating Challenges in Home AutomationCreative problem-solving and collaboration can lead to innovative solutions in home automation, despite potential challenges and limitations.

      Home automation and technology integration can present challenges but with creativity and problem-solving, these issues can be overcome. During the discussion, the speaker shared their experience with buying a 100-watt incandescent bulb for an old Easy Bake Oven, expressing surprise at the difficulty in finding such bulbs due to energy efficiency regulations. They also mentioned their desire to automate turning on a red Philips Hue light bulb outside their recording room when they hit the record button. However, they encountered difficulties in connecting the bulb to a hardware button. The speaker suggested a workaround by using their computer's do-not-disturb mode to trigger the light bulb. They proposed writing a function that constantly checks if the computer is in do-not-disturb mode and pings the Philips Hue API to turn on the light. This passive approach would eliminate the need to manually turn on the light. The speaker also expressed interest in setting up a sign for their recording room and discussed wiring options for their new office. This conversation highlights the potential challenges and rewards of home automation and technology integration. While there may be gaps and limitations, creative problem-solving and collaboration can lead to innovative solutions. The speaker's experience demonstrates the importance of finding alternative methods when faced with obstacles and the potential for improving workflows and enhancing the recording experience.

    • Setting up monitors or microphones professionally: Run XLR cables through walls or use Thunderbolt cables?Considering setting up monitors or microphones professionally? Weigh the benefits and costs of running XLR cables through walls versus using Thunderbolt cables. Learn more from resources like Westboss.com and Level Up Tutorials.

      For setting up monitors or microphones in a professional way, running XLR cables through walls is an effective solution. This is commonly done in recording studios by installing XLR outlets on the walls. This allows for hanging microphones from the ceiling or having monitors in separate rooms. However, this method can be costly and complex. An alternative, as discussed by Linus Tech Tips, is using Thunderbolt cables to connect a server or computer to a monitor. But this method may not be as reliable or cost-effective as running XLR cables through walls. It's important to weigh the benefits and costs before deciding on a setup. Additionally, there are resources like Westboss.com and Level Up Tutorials where you can learn more about setting up tech equipment and find courses to help you level up your skills.

    Was this summary helpful?

    Recent Episodes from Syntax - Tasty Web Development Treats

    823: Is Cursor AI the VS Code Killer?

    823: Is Cursor AI the VS Code Killer?

    Scott and Wes serve up a discussion on AI coding assistants with a deep look at Cursor AI, exploring its unique features like multi-line auto-complete and Smart Rewrites. They also discuss why Cursor’s intuitive UI stands out and tackle the big question: is it worth the investment?

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    822: Receipt Printer with JavaScript

    822: Receipt Printer with JavaScript

    Wes unveils his Hack-Week project —a thermal printer controlled by JavaScript that prints out Sentry.io errors in real-time. Scott and Wes dive into the nitty-gritty of how it works, from the ESC/POS protocol to tackling socket issues, and whether the project was worth the effort.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    821: Is Tauri the Electron Killer?

    821: Is Tauri the Electron Killer?

    In this episode of Syntax, Wes and Scott talk with Daniel Thompson-Yvetot about Tauri. They dive into what Tauri is, the motivations behind its development, its open-source ecosystem, use cases, and more.

    Show Notes

    Links

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    820: Potluck: 8000 ESLint Errors × HTML Time Tag × 7 Meg React Bundle × CSS Modules

    820: Potluck: 8000 ESLint Errors × HTML Time Tag × 7 Meg React Bundle × CSS Modules

    In this Potluck episode of Syntax, Scott and Wes answer your questions, from weighing the trade-offs between numerous small npm packages and a few larger ones to managing the challenges of work-from-home life. They also explore CSS modules, strategies for shrinking JavaScript bundles, and even where to find the best replacement ear cups for your headphones.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    819: Fun & Profitable Side Projects for Developers

    819: Fun & Profitable Side Projects for Developers

    Scott and Wes serve up a hasty discussion on side projects, sharing their latest Hack Week experiments and tips on how to turn fun ideas into profitable ventures. They cover everything from finding inspiration to choosing the right tech, and even offer advice on how to finish what you start.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 01:11 Brought to you by Sentry.io.
    • 01:27 Wes’ Hack Week project.
    • 02:30 Scott’s Hack Week project.
    • 04:18 Where do you get ideas for side projects?
    • 09:22 End goals for a side project.
    • 14:47 Other end goals.
    • 16:45 What tech should you use?
    • 20:34 Keeping notes.
    • 23:14 Finishing side projects.
    • 26:39 Shameless Plugisode!

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    818: CJ × Hosting Meetups - Lunch and Learn

    818: CJ × Hosting Meetups - Lunch and Learn

    In this episode of Syntax, Wes and Scott talk with CJ Reynolds about the resurgence of meetups in a post-COVID world. They discuss the benefits of attending and speaking at meetups, and the logistics of organizing them. CJ also shares his experiences running the DenverScript meetup, including sourcing speakers, finding venues, and ensuring a welcoming community.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    817: You Need These 30 Apps - PART 1

    817: You Need These 30 Apps - PART 1

    Scott and Wes kick off part 1 of a 2-part series, breaking down 30 must-have apps for web developers and productivity enthusiasts. From file management tools to media utilities, they cover everything you need to supercharge your workflow.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    816: Why Your CSS Sucks

    816: Why Your CSS Sucks

    Scott and Wes break down why your CSS might suck—from misusing specificity to not leveraging CSS variables. Tune in as they dive into common pitfalls that are making your stylesheets a hot mess.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    815: Deno 2 with Ryan Dahl

    815: Deno 2 with Ryan Dahl

    In this episode of Syntax, Wes and Scott talk with Ryan Dahl about Deno 2.0, its new features and use of web standards, and how it seamlessly integrates with popular frameworks like Next.js. Ryan shares insights on the motivations behind Deno’s creation, its emphasis on simplicity and security, and offers his take on the evolving JavaScript ecosystem.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    814: Fundamentals: HTML

    814: Fundamentals: HTML

    In this episode of Syntax, Wes and Scott talk about HTML fundamentals — from basic structure and semantics to practical tips for better accessibility and SEO. They also discuss the difference between block and inline elements, form functionalities, HTML5 elements like dialog and canvas, and more.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    Related Episodes

    Potluck - Where to start with JS × Freelancing × Cron jobs × Split testing × Frameworks in 2019 × More

    Potluck - Where to start with JS × Freelancing × Cron jobs × Split testing × Frameworks in 2019 × More

    It’s another potluck episode in which Wes and Scott answer your questions! This month - thoughts on frameworks for 2019, React Native, when should you start freelancing, where to start with JS, cron jobs, split testing and more!

    DevLifts — Sponsor

    DevLifts - Thad and JC are on a mission to make web developers healthy. They’re currently offering two options: The first is Fit.Start - perfect for beginners or those looking to get back at it.
    Use the coupon code “syntax” to get 50% off the fit.start plan. The second is DevLifts Premium - for those looking for a laser-focused approach and maximum accountability. Use the coupon code “tasty” to get 50% off the premium plan. Check it out today! Just for January their eight-week plan is back. Use the coupon code “newyear19” to get $50 off.

    Kyle Prinsloo’s Freelancing & Beyond — Sponsor

    Kyle Prinsloo teaches you everything you need to know about freelancing, including how to quit your job, earn a side-income and start taking control of your life. Check it out at https://studywebdevelopment.com/freelancing and use the coupon code “syntax” at checkout to get 25% off.

    Show Notes

    1:40

    • Where is the best place to start with JS coming from WordPress?

    5:36

    • How do you set up cron jobs? What are the best tools to use, should they run on their own server or on the application server, etc.?

    17:13

    • What new skills, frameworks, projects are you look forward to learning in 2019?

    21:35

    • Do you use any software for tracking analytics on your site and do you ever use this data to run split tests? If so, what is your preferred method for running split tests?

    28:24

    • What’s your best tip for young coders to stay productive and not lose time?

    32:08

    • I’m 17 and learning web dev. I’m pretty concerned about my skills and feeling some impostor syndrome. Is it ok to start freelancing?

    37:26

    • What is React Native? How do people tend to use it? If you want a native and web app, do they share code?

    Links

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats!

    Hasty Treat - Web Dev Resource Sick Picks

    Hasty Treat - Web Dev Resource Sick Picks

    In this Hasty Treat, Scott and Wes talk about all of their favorite web dev resources — a full episode of sick picks!

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at LogRocket.

    Show Notes

    2:03 - Twitter Accounts

    5:00 - Web Dev Resources

    7:37 - Design Resources

    11:36 - Desktop Tools

    14:59 - YouTube

    Links

    Tweet us your tasty treats!

    Tech Interview 101: Crack The Coding Interview

    Tech Interview 101: Crack The Coding Interview

    Parth's YouTube: https://www.youtube.com/DestinationFAANG/ 

    Most asked Technical Questions: https://docs.google.com/spreadsheets/d/1hzP8j7matoUiJ15N-RhsL5Dmig8_E3aP/edit#gid=1377915986

    Github Repo with all the Solutions: https://github.com/DestinationFAANG/Destination-FAANG-Java-Solution 
     
    Book: Cracking the Coding Interview, Programming interviews exposed

    Preparation Schedule: https://www.techinterviewhandbook.org/coding-interview-study-plan/

    Master Technical Interviews: https://youtu.be/-LVmKNvflnY?si=jrXIS8uzf9haBVED

    In this episode, Parth joins me to delve deep into the heart of technical interviews, a critical gateway in the tech industry. Our comprehensive discussion covers the various formats of technical interviews across different companies, highlighting the diversity and commonalities in these crucial assessments. We explore the typical pitfalls and mistakes that candidates often encounter, providing practical advice on how to avoid them. Our conversation also navigates through effective strategies for tackling tough technical questions, even when the answer seems elusive. 

    Logo

    © 2024 Podcastworld. All rights reserved

    Stay up to date

    For any inquiries, please email us at hello@podcastworld.io