2021-07-04 Links without scheme

I often write my blog posts using Elpher, a Gemini client for Emacs (a browser), using Gemini Mode (markup highlighting), posting them using Gemini Write (support for the Titan protocol). This Elpher setup ends up being smoother than using Eww (the Emacs Web Wowser, i.e. a web browser), and smoother than using Oddmuse Curl (the Oddmuse client for Emacs using curl).

When checking on the blog, when writing comments, I often use Firefox. Thus, I look at my own posts the Gemini browser Elpher, and the web browser Firefox. So how do I link from one page to the next? If I write “https://alexschroeder.ch/wiki/About” then following the link from Elpher opens it in the web browser Eww. If I write “gemini://alexschroeder.ch/page/About” then following the link from Firefox launches the Gemini browser Lagrange (not Emacs…).

https://alexschroeder.ch/wiki/About”

One day I learned that URLs without a scheme are legal URLs. If I link to “//alexschroeder.ch/page/About” then a browser looking at “https://alexschroeder.ch/” keeps using HTTPS and requests “https://alexschroeder.ch/page/About” where as a browser looking at “gemini://alexschroeder.ch/” keeps using Gemini and requests “gemini://alexschroeder.ch/page/About”.

https://alexschroeder.ch/”

https://alexschroeder.ch/page/About”

This is a great start but that also means that the server has to be able to serve the URL using either scheme! Currently, the situation is this:

https://alexschroeder.ch/wiki/About

https://alexschroeder.ch/page/About

gemini://alexschroeder.ch/wiki/About

gemini://alexschroeder.ch/page/About

Therefore, I try to write my links without a scheme and then they’ll work for both worlds:

=> //alexschroeder.ch/page/About
=> //vault.transjovian.org/text/en/Ijiraq_(mythology)

Result:

https://alexschroeder.ch/page/About

https://en.wikipedia.org/wiki/Ijiraq_(mythology)

These links work in both a Gemini browser and a web browser!

​#Gemini