RaweCeek.eu update
When I created raweceek.eu last year, I quickly decided to build it with React due to my familiarity with the library. However, over time I realized that using so much client-side code for such a simple website was silly. It was like using a sledgehammer to crack a nut. Even worse, older systems couldn’t display the page because browsers like IE6 and its predecessors don’t support contemporary JavaScript features. So I decided to change that.
First, I needed to switch to server-side rendering. That would allow me to fetch the next session, perform the necessary calculations, and return plain HTML to the client. Oh, you don't support fetch()
? I don't care - here's your working website. You're welcome! Instead of PHP or Perl one would probably use back then, I picked a lightweight framework called Flask. As is often the case with Python, it's unbelievably easy to use:
@app.route('/')
def index():
session = get_next_session()
if not session:
return render_template('index.html')
target_date = datetime.fromisoformat(session['startTime'])
current_date = datetime.now(timezone.utc)
race_week = target_date.isocalendar()[1] == current_date.isocalendar()[1]
return render_template('index.html', data={'race_week': race_week, 'json': session})
def get_next_session():
try:
response = get('https://raweceek.eu/api/sessions/next')
if response.status_code == 200:
return response.json()
else:
return None
except RequestException:
return None
Second, I wanted to ensure my project works on systems that are dear to my heart: Windows 98 and Windows XP. They can be downloaded from the Internet Archive, with serial numbers. I had no issues with Windows XP on VirtualBox, I even managed to install guest addons and unlock comfortable screen resolutions, file sharing, and other useful fetures.
But there was one problem with Windows 98.
Luckily, there's a special patch on GitHub to fix it. Simply attach it to a floppy drive and reset the machine.
Then, as the README suggests, patch the files:
Patch will be run in interactive mode and the default strategy (patch files, VMM32.VXD will be patched directly) is probably the best way even for later updates. After rebooting operation system should start successfully.
Internet Archive also has a video driver that can be used with VirtualBox. For more details, I suggest this article if you want to install Windows 98 on a virtual machine.
Alas, the background doesn't render properly in IE5. Sometimes similar visual glitches occur on VirtualBox, I suspect that this might not be an issue on a real Windows 98 PC. The point is, the website is perfectly usable!
To my surprise, there wasn't much to do on the HTML and CSS side of things. Sure, you can't use <span color="value">text</span>
, you have to replace it with <span style="color: value">text</span>
. You can't use rem
instead of px
to define font sizes and margins. Nevertheless, these are small changes. Since the original page was short and simple, it took me maybe ten minutes to finish this part.
The final boss was HTTPS. Fun fact #1: while modern browsers warn you when you're trying to open an HTTP website, old browsers warn you when you're trying to open an HTTPS website. Beware, user! This page might be secure 🙀! On Windows 98 and Windows XP, most of the world wide web is inaccessible because of that. Despite support for HTTPS, the browsers refuse to work with it. My wild guess is that this is due to newer SSL ciphers and the lack of contemporary root certificates. From my understanding, that shouldn't be a blocker for RetroZilla.
I reconfigured nginx to allow HTTP connections to raweceek.eu. To my surprise, the guest book I'm using also supports the HTTP protocol. It turned out to be a perfect choice for my project! Fun fact #2: google.com is among those retrogrades who still let their users connect without HTTPS.
So, what now? I redesigned the website to look a little older than my original concept, now it's closer to that old-school style I was aiming for. It can provide information to any user. One can even curl
it and see all the data thanks to the server-side rendering. Hence, my job is done here... At least for now!
Happy new Formula 1 season to all the fans!
Useful links
- RaweCeek.eu
- The GeoCities Animated GIF Search Engine
- Windows XP Professional SP3 x86
- Windows 98 Second Edition ISO File
- Patch for Windows 95/98/98 SE/Me to fix CPU issues
- Windows Me Display Driver ( VBE Miniport Standard PCI Graphics Adapter VGA) for use with VirtualBox
- How to install Windows 98 on VirtualBox
- How do I skip MSN setup and launch IE directly on Windows 98?
- Flask framework
- Browser support tables for support of front-end web technologies
- Create animated GIF text