Let me tell you a story…
In my first professional year (~1995/1996) as a ~~web developer~~, well webmaster at that time, I was working on the BNP website. Yes, the BNP French bank website, except at that time it was only a couple of hundreds static web pages (maybe around 300).
The client asked us to fix the footer on all these html files. The job was assigned to me.
I opened the local website FTP folder with all the files in it. I started to look at the HTML and noticed a simple search and replace would not do it.
Let's use Regex for parsing/fixing HTML. Haha.
Very proud of my regex, I executed it on all files. Sure I had done a good job! I dropped the folder in the FTP application and all files on the live site were replaced.
Oooops!
I had made a mistake in my regex. I replaced every characters in the HTML by character + space. The site was now displaying the raw ascii characters.
< H T M L >
< H E A D >
< T I T L E > B N P < / T I T L E >
and so on. The roughly 300 files. I had no backup. Cold sweat.
We were around 6 or 7 people working in this Web agency as webmasters. I asked everyone
- to stop everything they were doing.
- to not visit the BNP website.
- to save locally every cached files in their browser history and/or their local backup if they had and send them to me.
On a couple of hours we have been able to recreate the site and with a bit of manual work too.
That was one of my most formative mistakes at the beginning of the Web.
- Work on a backup.
- Do not synchronize before checking locally.
- Install a local web server on your computer.
- Browser caching is cool!
- Teams are awesome. You are not alone. You can reach out for help.
- Create a better team process for working on sites.
- Do not use Regex for parsing HTML
Mistakes will happen. Learn from them.
Otsukare!