Pathgrind
Overview
Pathgrind is a redirection resolution service available via a web interface and a free API. The idea came when I was looking for a service to programmatically follow client-side redirects for a given URL. While the web is full of services advertising redirect detection capabilities, all the ones I tested rely on HTTP headers to detect and track redirects. Some websites however execute JavaScript on the browser to redirect the user to a different URL after the page is loaded, which these services fail to detect. I also saw this idea as a great learning opportunity, as it was the first time I built and shipped my own web service from start to finish. It also served as a good excuse to get more comfortable with the powerful tool that is Docker.
Features
- Find redirections for any given URL
- REST API
- Ability to alter resolution parameters to get the most optimal results (API only)
Implementation details
To resolve URLs with the greatest accuracy, Pathgrind simulates a regular user visit using a headless instance of Chrome running in a Docker container. The system connects to the browser instance using the Chrome DevTools Protocol to extract the final URL. The timings can be configured using the API.