[NTLK] Navigating the web with the newton
Matej Horvat
matej.horvat at guest.arnes.si
Fri Dec 22 14:36:56 EST 2017
On Fri, 22 Dec 2017 07:53:40 +0100, B Dudney <kosmicdollop at saber.net>
wrote:
> Abraham, I’m not trying to pour cold water on your idea, but I’m
> concerned you may spend a lot of time before discovering Newt is beyond
> what you have in mind.
Not at all, especially if you stick to mobile/lightweight versions of
sites. A great recent example is http://lite.cnn.io/ (just pointing it
out, before anyone accuses me of being biased).
Here are some of the tricks I used in PWproxy (my proxy for
NewtonWWW/PocketWeb) to compact pages (in some cases down to 20% of their
original size):
* Remove unneeded whitespace. In HTML, more than one space/line break/tab
does not make a difference, except in <pre> elements.
* Remove all comments (<!-- ... -->), <script>, <link>, and <style>
elements. (This and the above will already make up most of the savings.)
* Remove tags (but not the text between them!) that Newton browsers don't
care about and therefore don't render differently from normal text, for
example <abbr>, <label>, <noscript>, <span>, etc. Most of the new HTML5
elements fall into this category. (The two most well-known HTML5 elements,
<audio> and <video>, should be removed completely.)
* Actually, just remove _all_ tags except those that you know are
supported by the browser. HTML is designed so that (in theory) pages
should work if browsers ignore unknown tags, so you will not break
anything by removing them outright.
* Remove </p> and </li> tags (but not the opening ones) since they're not
required in HTML.
* If you don't want images at all (not just "load on demand"), remove
<img> elements, since the URLs in them tend to be pretty long.
* Replace certain tags with other ones which are semantically different
but render the same and are shorter, for example <strong> with <b>, and
<em> and <var> with <i>.
If you want images, you should preprocess them (e.g. with ImageMagick) to
dither them down to 1-bit (or 4-bit) and scale them down to the Newton's
screen size.
With some creativity, I think you can make quite a lot of pages work. At
the same time, your expectations shouldn't be too high. I was quite
satisfied with the results I got with PWproxy and NewtonWWW/PocketWeb (and
that was on Newton OS 1.x); on a MP2x00, you're much less constrained as
the NewtonScript heap is much larger.
Still, no matter how much you compact pages, there will be some that will
be simply too big to fit in memory (Wikipedia and forums come to mind).
The next step in your proxy would be to split them up into multiple parts:
add <a> elements at the beginning and end to go to the previous/next part.
The proxy would then interpret a special parameter in the href attribute
to determine which part to send to the Newton.
At some point, it would be really neat to write such a proxy not just for
Newton browsers, but also for 680x0 Macs, etc. It's been on my to-do list
for a long time...
Two other things you can try:
* Gopherspace. Surprisingly, there's no(?) Gopher client for Newton OS,
but there is Floodgap's public HTTP proxy:
http://gopher.floodgap.com/gopher/gw/
* http://wiby.me/ (this is more of a curiosity, but you never know - it
appeared recently)
Good luck!
More information about the NewtonTalk
mailing list