Deploying SSL Across the Site
The transfer protocol for this website has always been HTTP in the past six years. HTTP was the main protocol for most websites when I started building Legendword. However, this has changed rapidly as people pay more and more attention to Internet security. HTTPS is now commonly implemented and recommended for every site. Browsers like Chrome even prompts "Not Secure" when visiting web pages via HTTP. That's why I've decided to deploy SSL and enable HTTPS for all web pages.
This process is normally very easy, but for me things are more complicated. It has to do with my tradition of using absolute URIs. When I first started, I never thought that the protocol would ever change. I assumed it would always be "http://", thus hard-coded all links to my web pages and resources with "http://legendword.com/". The reason I didn't use relative paths like "../files/xxx" is that I considered the possibility of moving my files around. If I included a dependency stored in the files directory via relative URL, I would have to change this relative URL every time I move the page.
Time has proved that this isn't a good idea. First of all, it turns out that I don't actually move files around much. And referencing a dependency from another directory is not a good way of organizing projects. All files related to a project should ideally be in the same directory and referenced relatively.
So now when I change the protocol, I have to change the links in every single file in every project! Replacing http:// with https:// is simple using Replace All in a text editor, but just opening and saving all these files... It really costs a lot of time.
The website is now secure, and users logging into their accounts won't have to worry about that "Not Secure" prompt anymore. I understand that I should've switched to HTTPS a long time ago, but as I said, changing the links is no easy task.
I think what we can learn from this is to never use absolute URLs.