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

web browser

Get Last Modified Value of a WordPress Post

Last updated on June 19, 2023 by Sal Ferrarello

When reading an article online, I find it helpful to know when the article was last updated. Not all blogs display the last updated value however even when the last updated value is not displayed, the value is accessible via the WordPress REST API. This is how I retrieve the last modified value from the WordPress REST API.

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

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