• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for web browser

web browser

Pretty Print JSON URL

Last updated on May 20, 2023 by Sal Ferrarello

I work a lot with JSON endpoints and having a browser extension to pretty print the JSON response is invaluable. However, sometimes I’m using a different machine (or guiding someone on their machine) and rather than asking them to install a browser extension, I use this trick. If the user is on the page displaying the JSON response, running this command in the browser console will pretty print the response await (await fetch(window.location.href)).json().

Filed Under: Dev Tips, Solution Tagged With: JSON, REST API, web browser

How to Run Code in the Browser Console

Last updated on May 6, 2023 by Sal Ferrarello

As a developer, a trick I often use is running some JavaScript directly in the browser to confirm the behavior.

Filed Under: Computing, Dev Tips, Programming Tagged With: JavaScript, troubleshoot, web browser

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in