Lightweight Browser

In comp.sys.raspberry-pi, Axel Berger wrote: [html design in a text editor]

I code my web pages from vim, but I also use templates, which provide a good automation outside of my editor.

No problem. Make it a React page and just JSON to supply the differences for the other 4999 pages. That's the 2020 way to do it, not necessarily with React, but possibly some other "SPA" system:

formatting link

Even before "SPA" was an idea, I was writing sites that used separated template and content, just stitched together on the server side, circa

1999. Nor was the idea new with me.

Elijah

------ then, and now, avoids using javascript as much as possible

Reply to
Eli the Bearded
Loading thread data ...

Den 2020-08-13 kl. 17:50, skrev Axel Berger:

That goes for most programming languages, just the amount of guess-work differs.

- did the programmer mean to use variable b as a Boolean or int or long here ? c : int b = 1;

- did the programmer mean to use variable b or b2 here here ? (Visual basic - not .NET with option explicit off b2 = 4

-- b2 not declared, but let's do that for him. He probably wants that

PHP - let's guess he means false - since the truth-table is a nightmare anyway

I especially enjoy the NULL row

c : int main (void) { int i; long l; l=1; i=2; i=l; // why can I do this? they have different data types - guesswork }

The examples just goes on

yes

Reply to
Björn Lundin

With as little overhead as possible might be Netrik. Note that HTTPS support only exists if you tell it to fetch pages using wget, and even then it's clunky. It's the best answer I know if I take your question literally though.

Taking it less literally, there's Lynx, W3M, Links, and Elinks as text-mode browsers with a bit more bulk to them. W3M can display images inline if it's set up right. Lynx, Links, and ELinks can open images that you select in your preferred image viewer (eg. xv, xzgv). Some support CSS, and maybe some claim of Javascript support (but not enough to be much use today).

Taking it even less literally, there's Links2 (sometimes just called Links, as it has been already in this thread) which includes a graphical mode where images are displayed inline and other "improvements" over terminal-based page rendering are available. Then there's my personal favourite Dillo, which is the most minimal of the web browsers with more "modern" graphical page rendering. Sort-of supports CSS, but no Javascript support.

Just before I give up on "as little overhead as possible" entirely, there's Netsurf. It's bulkier than Dillo but has some Javascript support and maybe slightly better CSS support. Not enough to make things like modern online shopping sites work though, so it's no better than Dillo for my use, while being less efficient (I don't care much about CSS and other design elements being broken though).

Then the rest are mostly based on the same rendering engine as Firefox or Chrome, so performance-wise the advantage can never be very significant compared to mainstream browsers. I don't bother with these anymore, but others do (presumably more for features than significant performance advantage).

Oh, I did forget Hv3. It's no longer developed but does a pretty good job rendering some modern pages. It's not ideal performance-wise though because it's written in Tcl. Also HTTPS support is a bit broken (though that might have just been my installation).

formatting link

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

I have gotten edbrowse javascript to work in the past. The version I have installed now (3.6.x) is breaking on JS, but it works for non-JS sites. 3.7.x uses a new JS backend, maybe time to update.

In the following session, I open my site ( https://qaz.wtf/ ), show the first ten lines of the rendered page (1,10p), follow link

1 on line 9 (9g1), display lines 1 to 12 of the next page (1,12p) set input one on line 12 to be "edbrowse FTW" (12 i1=edbrowse FTW), submit the form using the button on line 12 (12i*), view the first twenty lines of the next page (1,20p), follow the link on line one, (1i*) [goes to same page a first link followed], show lines 45 to end of file (45,$p), poke around to find the right line (51), add in some UTF-8 to form on line 53 (53i=???????? ???), show line 54 (54), submit the button on line 54 (54 i*), show the contents of the next page in two twenty line batches (1,20p) and (21,40p) then quit (q).

Really clever, but I didn't do it, would have been to use edbrowse's native cut-n-paste to copy the "???????? ???" text. In edbrowse you can have multiple buffers at once, and that's how TEXTAREA inputs are filled out. So I could have copied a line to a new buffer, and then used that buffer for an input. For , the buffer needs to be a single line only.

Script started on Thu Aug 13 20:33:00 2020 $ edbrowse https://qaz.wtf/ no ssl certificate file specified; secure connections cannot be verified

5254 Unable to communicate with edbrowse-js, javascript is closed. Javascript engine has failed; all current javascript sessions have been closed. 507 1,10p [Q and Z] The soft senusous curves of Queen Q and the hard sharp points of Zestful Z.

? ? ? ? ? ? ? |[]|[]||[]|[]||[]|||||||[]|||[]||[]|[]| |[]|[]||[]||||[]||[]|[]||[]|[]||[]|[]||[]|| |[]|||[]|[]||[]|[]|||[]|||[]||[]|||||

Major attractions ? {Unicode Toys} ? {Blog} ? {Moria (source code)} ? {PVRG JPEG (source code)}

9g1 5204 Unable to communicate with edbrowse-js, javascript is closed. Javascript engine has failed; all current javascript sessions have been closed. 1813 1,12p Unicode Toys

Unicode Text Converter

Transliterate plain text (letters, sometimes numbers, sometimes punctuation) to obscure characters from Unicode. The output is fully cut-n-pastable text.

This is the toy most visitors here want.

12 i1=edbrowse FTW 12i* submitting form 10629 Unable to communicate with edbrowse-js, javascript is closed. Javascript engine has failed; all current javascript sessions have been closed. 4887 1,20p {?}

Unicode Text Converter

Convert plain text (letters, sometimes numbers, sometimes punctuation) to obscure characters from Unicode. The output is fully cut-n-pastable text.

Circled ???????? ??? Circled (neg) ???????? ??? Fullwidth ???????? ??? Math bold ???????? ??? Math bold Fraktur ???????? ??? Math bold italic ???????? ??? Math bold script ???????? ??? Math double-struck ???????? ??? Math monospace ???????? ??? Math sans ???????? ???

1g1 5204 Unable to communicate with edbrowse-js, javascript is closed. Javascript engine has failed; all current javascript sessions have been closed. 1785 45,$p Samples: {interest}, {heart}, {vulgar}, {latin.*ligature}, {latin .*[aeiou]} (with trailing space).

Show Unicode Character

Enter a code or character and see the Unicode name. Use START-STOP to show a range.

Raw string Raw text range Hex range Integer range U+CODEPOINT

{9812-9823} (int), {2500-25ff} (hex), {U+1F4A9 U+1F3F3} (codepoints)

51 Use START-STOP to show a range. 53i=???????? ??? 54 Raw string Raw text range Hex range Integer range U+CODEPOINT 54 i* submitting form 4283 Unable to communicate with edbrowse-js, javascript is closed. Javascript engine has failed; all current javascript sessions have been closed. 1403 1,20p {?}

Show Unicode Character

Enter a code or character and see the Unicode name.

  1. Use START-STOP to show a range (raw, hex or int).
  2. U+HEX (optional whitespace) U+HEX (optional whitespace) ... to show a list of hex characters.
  3. Use "raw string" to display identification for all characters in the query box.

Raw string U+hex code point list Raw text range Hexadecimal range Integer range

Info for string "???????? ???"

119942 {1D486} ? MATHEMATICAL BOLD ITALIC SMALL E

119941 {1D485} ? MATHEMATICAL BOLD ITALIC SMALL D

21,40p

119939 {1D483} ? MATHEMATICAL BOLD ITALIC SMALL B

119955 {1D493} ? MATHEMATICAL BOLD ITALIC SMALL R

119952 {1D490} ? MATHEMATICAL BOLD ITALIC SMALL O

119960 {1D498} ? MATHEMATICAL BOLD ITALIC SMALL W

119956 {1D494} ? MATHEMATICAL BOLD ITALIC SMALL S

119942 {1D486} ? MATHEMATICAL BOLD ITALIC SMALL E

32 {0020} SPACE

119917 {1D46D} ? MATHEMATICAL BOLD ITALIC CAPITAL F

119931 {1D47B} ? MATHEMATICAL BOLD ITALIC CAPITAL T

119934 {1D47E} ? MATHEMATICAL BOLD ITALIC CAPITAL W q $

Script done on Thu Aug 13 20:37:17 2020

Elijah

------ as simple as ed, and with errors to match

Reply to
Eli the Bearded

The standard is loose Pages are dynamic Pages are enriched with CSS and JavaScript

More often the problems are not in the HTML code

This is not applicable to modern web - you just test one static page, without the CSS and JavScript in it.

This is naive. Sorry.

Reply to
Deloptes

Some interesting suggestions here, thanks all. I can see I'll be busy!

Reply to
Folderol

Please report back if you find anything that's actually good.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
 Click to see the full signature
Reply to
Ahem A Rivet's Shot

So? I hate things that wiggle and flash on web pages so don't use 'em. Instead I concentrate of creating readable, tolerably well-formatted pages that are free of annoying doodads. If that's naive, so be it.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Exactly, although I have wriiten and used some JS where it really provided a benefit -- but very sparingly and only as a nice and well worth-it add-on.

Besides I have exactly one CSS per site and those are 90 % identical across sites. Of course they were thoroughly validated and tested, but that was quite some time ago by now. On the other hand I do write and update a lot, so that's where the current testing goes.

An yes, Deloptes is right, testing and validating CSS is quite a bit more involved and tricky than sinmple HTML. Keep it simple, structured, and logical goes a long way but is quite hard to do in CSS.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

| That's not the main point. Very few sites come even near to being valid.

That is the main point. Many sites now load MBs of script. And loads of unnecessary fonts. I generally disable script. I always disable fonts. Nearly every site loads pretty much instantly for me.

It's true that pages are also overloaded by junk created by WYSIWYG tools used to make corporate pages, but that's not the biggest problem.

| 90 % of the bloat (and the same share of the malware entry points) come from trying to second guess, whatever the author might have meant by the utter nonsense he wrote. |

Virtually all malware weakness comes from script. Cut out executable code and the page is safe, because then you're just dealing with display instructions.

HTML is not XML. It was never meant to be strictly interpreted. It was meant to be simple, accessible to the masses, with the idea that the browser would just do its best with what it's given. That's allowed most pages to work well enough. And that's the idea. People want to see a webpage, not police coders.

There are lots of problems, especially from people who don't know what they're doing. An increasing problem I see is "lazy load" images that are completely broken without script because the SRC attribute is missing or invalid. But even that wouldn't be a problem if people followed what used to be rule #1: A webpage should degrade gracefully. It should look as good as possible in as many browsers as possible. If script is used it shouldn't be required. No one follows that rule anymore because it's all about commercialism and spying. The only use I see of NOSCRIPT tags these days is so that Google can spy with their googletagmanager even if a visitor disables script, by using a web bug. I visit pages that are so broken without script that they're completely blank, yet Google is still there to try to spy on me!

To the OP: Accessibility options mean that you can set most browsers to block script, ignore images, prevent reloading and pre-fetching, etc. It doesn't have to use a lot of resources.

Reply to
Mayayana

"Poprocks" wrote

| I don't agree with that at all. I'd say that accounts for some of the | overhead, but a very small percentage. | | The real issue is that webpages have stopped becoming *pages* and are | now essentially applications in and of themselves, all being run through | essentially slow, interpreted languages.

Yes. And many are 5-20 MB of files. A risky, spyware, software program thrown together as you load the page. They're creaky, crappy apps. Most of the software on my system isn't that big.

Reply to
Mayayana

Good and thank you - however it is naive to assume that a browser capable of handling your pages well is good enough for general use. Too many use the wiggle and flash techniques for content.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
 Click to see the full signature
Reply to
Ahem A Rivet's Shot

Indeed, and a site that isn't valid HTML according to the spec doesn't take materially more compute resource to parse. Maybe it's more ambiguous and the results might differ between browsers, but it's not slower. HTML isn't the problem, Javascript is.

(I put sites like Facebook and Youtube through the W3C validator. They didn't pass, but the problems were mostly applying name="..." to elements that should have that according to the spec. That's not going to slow down parsing - but those things are necessary for Javascript to manipulate the DOM)

And some of those scripts are doing intrinsically complicated things, like doing a live auction of the user's eyeballs to the highest bidder advertiser

- all while the page loads.

Block those things and page load times come down a lot, but there's still tons of complicated Javascript in something like Google Docs which you can't block or it won't work.

To the OP, there are browsers that have a full webkit engine (so the JS works) but the UI is written in C(++) not in Javascript, which makes them faster and lower footprint. Look at Otter Browser, QtWebkit and some others.

Theo

Reply to
Theo

Yes, agreed. HTML was *designed* to be forgiving, as part of its /modus operandi/. This video by Professor Brailsford is on point:

formatting link

What do you perceive to be the issue with JavaScript? Is it an inherent with the language itself, or is it just over-used?

I think we can probably all agree that when it was conceived in 1995, it was probably only intended to give webpages a bit of "help" with some client-side operations, but not to completely replace the heavy lifting of processing of information, which ought to be done on the server side with more capable languages (yes, I am aware of Node.js and all that jazz. Not super familiar with it, but it all still seems like trying to pound a round peg into a square hole to me).

I think this is an example of a *good* usage of JavaScript.

However, for users who disable JavaScript, in such situations the page ought to still *work* and show the updated information if the user reloads the page, instead of just refusing to work at all, which is what we see all too often.

Indeed. In a way --- although it seems to have happened historically by accident --- I think the original idea starting with Netscape Navigator (2.x I believe, but certainly by 3.0) to have JavaScript do some light-duty client-side capabilities, and have Java do some heavier-duty web-based applications through Java applets, was on the right track.

Now, with --- to use your example --- Google Docs, I can barely get the thing to run on my 2-in-1 Intel CherryTrail tablet, with 4GB of RAM and a (admittedly underpowered) multicore x86_64 processor.

And yet, I know if I was somehow able to access the Android mobile app (likely written in Java incidentally, though I stand to be corrected on this), my guess is it'd work quite well.

I'll add that I've been quite impressed by Falkon. It utilizes Qt WebEngine but has a fully native C++ Qt interface. It won't be as light and zippy as something like links -g or dillo, of course, but it seems to be a very good candidate for a "middle-weight" browser. It also manages to look quite a bit like Chrome, which makes the interface friendly and familiar.

I can't quite free myself from the teet of Chromium just yet, but Falkon has a better chance of becoming my new daily driver than (sadly) the likes of Firefox.

Reply to
Poprocks

BTW Flash is out as of this year. HTML5 replaces it's functionality. We can safely say "Thanks God!" here, but it will take quite some time for all flash based application on this earth to replace it.

Reply to
Deloptes

It was lack of other options. I guess now with HTML5 things will change and yes pages will be like application (or are already) and all of those JAVA applets or flash apps will be replaced sooner or later. Older HTML did not offer too much room for interactive pages. I guess this is why applets and Flash was there, but AFAIK it is already depreciated and you will do it in HTML5 (may be with JavaScript) with some engine in the background either locally or remotely - I have seen both so far.

IMO the problem is the amount of interaction embedded in a web page that does not benefit the consumer of the page. When I look opening i.e. yahoo mail it loads constantly adds, or communicates with large number of servers in the background, that have nothing to do with the content. But at the end this is how they make the money. I don't know how good are commercial pages - I mean not Yahoo, Google etc. that sell you data, soul and anything to the devil.

Reply to
Deloptes

JavaScript was in Netscape 2.0 along with file upload and a nasty nasty security bug - you could use JavaScript to populate a hidden file upload field and snarf any file from the user's machine. In Netscape 2.1 JavaScript could no longer populate a file upload field.

I used JavaScript and file upload (but not the bug) to produce a

*very* early (1995/6) internal web application for Motorola (using Netscape 2.0 originally). So early that I was part way through development when I inverted my perspective and thought of it as an application instead of a set of dynamic web pages. What they wanted was a wiki but those were quite some time in the future and beyond my imagination - what they got was a document repository and discussion service (INN with a web front end and a funky authentication system).
--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
 Click to see the full signature
Reply to
Ahem A Rivet's Shot

I was extremely excited when I read several years ago that HTML5 would video playback without requiring Flash video or other plugins. I thought it would be a great win for desktop Linux, since we would then finally be able to experience 2D hardware-accelerated video, which we had had with native applications for many years ("xv" video output, anyone?), without relying on proprietary technology dependent upon companies (*cough* Adobe/Macromedia *cough*) to be nice enough to provide this to us.

Unfortunately, the reality has been different; only as of very recently do we have support for hardware-accelerated HTML5 video, and what we do have is in its infancy and largely experimental in nature.

That is not to say I'm against open standards such as HTML5; I'm all for it. I just wish the reality had played out as nicely as the promise.

Reply to
Poprocks

can

There are five thousand year old clay tablets perfectly legible today. I myself have helped a little in transcribing and translating Latin and Hebrew manuscripts from the 12th and 13th century. I've just ordered an antiquarian book from 1903 that will arrive in a few days. My own web-pages with embedded video were perfectly valid when I wrote them only ten years ago and I'm certainly not going to redo them all now just because the fashion in skirt length is slightly different this season.

Read and understand why and for what purpose Tim Berners-Lee devised HTML and HTTP and what he had to say about interoperability and enduring standards.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

My email is part of my web hosting package. They make their money by sending me a reasonable bill once a year. I can put a number to the price of my package, you can't, but I'm convinced that, all added up, mine comes out cheaper.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.