Surfing Modern Web With Ancient Browsers

(note this is a guest post by Tenox)

UPDATE: there is a new version released as a Web Proxy service and available for both Mac OS X and Linux. Read on here…


I spend a fair amount of time working with legacy operating systems. Apart from being obsolete themselves they suffer from a common problem – the web browsers are simply unusable on a present day Internet. You start by getting JavaScript error on google.com and it only gets worse once you go further. Try going to microsoft.com with IE 1.5 or qnx.com with the last version of Voyager. This just doesn’t work. With rapid progression of web standards, the situation will only be getting worse in time. Something had to be done to ease the situation.

Quite a while ago I’ve came across Opera rendering proxy for mobile browsers. This got me thinking. If you could render a web page on a proxy server to a simplified HTML, say 3.x. This would make a lot of web browsers happy. For some unrelated purposes I have been using webkit2png which allows to create a whole web page snapshot in a single png image. Wait… what if such image had an image map of clickable regions pointing to the original links? Maybe…

The idea was born, but was it possible to implement and would it work? Webkit2png was quite far from having all the required functionality. For various reasons Python and I will never be friends, so extending the original script was bit out of luck. Fortunately though after some additional research I have stumbled upon picidae network. To my utter surprise they actually made all or even more functionality that I wanted in their picidae.py script. All that had to be done to adapt picidae to my purpose was to save the image as a GIF image, generate a simple HTML page with an input box and strip all the unwanted stuff. This I could survive in Python.

Webrender.py came to life. It’s a cgi-bin application that resides on a machine in the middle. It renders a gif image and spits out to the browser together with a simple web page, containing a URL and search input boxes plus the gif and image map.

After some initial debugging and massaging out few bugs the solution worked perfectly! I could finally get the old browsers happily navigate modern websites! Check out some examples:

Internet Explorer 1.5 browsing Microsoft.com

Internet Explorer 1.5 browsing Microsoft.com

Yes! You can finally browse microsoft.com with IE 1.5 !

Netscape 4 browsing Netscape.com

Netscape 4 browsing Netscape.com

Or go to netscape.com in Netscape 4.x browser. This was impossible just a short while ago!

Mosaic on Windows

Mosaic on Windows

You can now read news using old Mosaic!

How about some non-windows browsers:

voyager

QNX Voyager browsing qnx.com

Mozilla on UnixWare

Mozilla on UnixWare

Bon Echo - Old Firefox on Haiku OS

Bon Echo – Old Firefox on Haiku OS

Mosaic on Mac

Mosaic on Mac

IBM WebExplorer on OS/2!

IBM WebExplorer on OS/2

NextStep OmniWeb on Reddit.com

NextStep OmniWeb on Reddit.com

 

Nothing is perfect though and there are some major caveats using this solution:

  • The script currently only runs on Mac OS X. Although theoretically possible to use on Linux, I haven’t been able to do so far. Maybe the readers can help!
  • I have been doing most of development work on Snow Leopard under VMware. I know that Mavericks sometimes suffers from the error described here. Hopefully it can be resolved soon.
  • An application using the display engine has to run under a regular user and it just cannot be run from Apache / daemon user. Therefore the install is rather clumsy. However a built-in python web server comes handy for it.
  • Can’t handle downloads etc. I’m planning to implement bypass mode for that.

I’m currently rewriting the script to work as a fully fledged HTTP proxy server instead of a cgi-bin application. It’s actually 99% complete minus some python multithreading issues.

I’m also thinking about rewriting it in something more portable. For instance QtWebKit, WebKitGTK+, PhantomJS, or maybe a totally different layout engine all together.

The cgi-bin version is available for download here. To install create a cgi-bin subdirectory, place the script in there, chmod 755, start python web server: python -m CGIHTTPServer 8000 then point your browser to http://x.x.x.x:8000/cgi-bin/webrender.py

Enjoy!

This entry was posted in Networking. Bookmark the permalink.

4 Responses to Surfing Modern Web With Ancient Browsers

  1. Tom says:

    Hi,what a brilliant idea! Have you had any luck with scripting this/implementing on system 6 or 7?

  2. Not Tom says:

    Love the idea! Hope you get it running on Linux!

  3. tenox says:

    I have a QT-Webkit version that works on Linux. It’s still work in progress but getting there.

  4. Belzebu Revenge says:

    Amazing job Tenox !

    Is there any limitation or web sites like Facebook and Twitter are supported ?
    I mean, is possible to log in to Facebook and navigate on it ?

    Thx a lot !

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.