A lot of the posts I write include command-line interface (CLI) commands to type in. I’ve found over time there are things I can do to improve how these commands are communicated.
website
Why Can’t I Host My Website on My Own Computer?
Whenever I’m talking to someone interested in their first website and I tell them about paying a hosting company where the website will live, they’ll often ask, “Can I host my website on my own computer?” This is a great question and while ultimately the answer is no, it is worth looking at why.
301, 302, 303, and 307 Redirects
A quick table of the differences in 301, 302, 303, and 307 Redirects.
HttpOnly Cookies
For fun, I was copying the “wordpress_logged_in_” cookie on one of my sites so I could manually set it in another browser and log in without going through the authentication step. While it worked, I noticed I could read the “wordpress_logged_in_” cookie from the Chrome developer tools but I could not read the cookie with JavaScript. It turns out this is because it is a HttpOnly cookie, which I got to learn about.
JavaScript Idle Detection
Recently, I needed to determine when a website visitor was idle for a certain amount of time. I thought this was an interesting problem and wanted to spend a little more time with JavaScript so I wrote some code for it.
Speed Up WordPress Website
Slow websites are painful. An important value to look at when optimizing your website is the TTFB (Time Til First Bye), which is the delay between when the request is sent to the server and server actually responds. These are some of my notes on improving (e.g. reducing) the TTFB of a WordPress website.
How Blogging Helps Me as a Developer
At WordCamp US 2016 I gave this talk, Blogging – The Best Thing I’ve Done as a Developer. This post contains the same general content in written form (for those like me who prefer reading instead of watching a video). I started blogging here at salferrarello.com in 2013 while working as a developer at LaunchDM. […]
Responsive Images with srcset
When loading an image, historically I loaded the largest size of the image that would be used. e.g. example.jpg is an 1170px wide image for large screens. On small screens this big image is loaded but scaled down to display properly. The important thing to note here is even if the image is only displaying […]
WordPress Bad Login Attempts
WordPress Bad Login Attempts Problem Every WordPress site I’ve ever worked with has seen unauthorized attempts to login to the site. Generally, these attempts are not targeted at the site specifically but instead are part of a huge automated attack. People want to hack into “a WordPress site”, not necessarily “your WordPress site”. These people […]
Git Conflict Compiled Sass Files
I’ve been using both Git and Sass for some time now. These two tools have had a huge positive impact on my development. The issue that arises when combining Git and Sass is when checking in compiled CSS, it is common to get conflicts with other contributors on the Git repository. Don’t Check in Your […]