In this article, we will talk about a free URL shortener that does not need any server-side processing.
FossURL is a free easy to use URL shortener that does not need a PHP or NodeJS Server to work. It does not require any server-side processing for URL shortening. That means, it can use any online data store that supports database queries. Due to that, you can host it on static site hostings like GitHub, GitLab, etc.
The technologies used in this URL shortener are divided into two segments, Client Side, and Server Side. The Client Side covers the user interface and code for local and server queries. The Server Side includes an online datastore JSONstore.io that supports JSON queries.
JSONstore.io is a free JSON based cloud data store. When you visit this data store, it gives you a URL (endpoint). That is a URL to your data store. With that URL, you can communicate with your data store by sending HTTP requests. There are four simple requests that you can use to communicate with your endpoint. These requests are
- POST: request to store data
- PUT: request to modify data
- GET: request to retrieve data
- DELETE: request to delete data
You can read more about these requests and their implementation here.
The source code of FossURL is available on GitHub under MIT License. JSONstore.io also comes under MIT License and free to use. You can use any or both of these services to create your URL shortener or any other feasible project.
How Does This URL Shortener work Without Server-side Processing?
The backbone of this URL shortener is JSONstore.io. It saves all the data there and retrieves it when someone uses the generated short links.
When you paste your long URL on FossURL to make it short, it generates a random slash-tag for that and saves it on JSONstore endpoint by sending a POST request.
When a user uses that short link, it first takes you to FossURL homepage where it sends a GET request to retrieve the data. This GET request fetches the destination link for that particular slash-tag and redirects the user to that link.
This way, FossURL shorten your URL easily without the need of any fancy server with PHP or NodeJS.
FossURL – GitHub
JSONstore.io – GitHub
FossURL is a very clever way to short URL without the need of any server-side processing. It’s a great use of JSONstore datastore. It is a good example to inspire many others to think differently to achieve a goal. JSONstore has great potential to power many other clever projects like FossURL.