General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Latest stable version unusable on heise.de with JavaScript
Posted by: Voltaire
Date: December 26, 2020 04:25PM

In the download section the latest version that is declared stable is 75.1 ... it is nice to use it withoud scripting as it is really fast ... but many of new pages are not correctly displayed. This does not bother when you don't see any ads (as they are anyway not wished). But it gets a problem when you have set JavaScript on and want to visit www.heise.de ... Without script most of the things run fine. But as soon as ou turn on JavaScript the browser stops working and freezes. You have to kill it - and then at least scripting is turned off. If that would not be the case and you come back to an already open heise.de-page it would immediately freeze again.

So the questions:

Is there a way to disable some specific scripts while loading (or just before loading and say no to load them) - as it is/was with MSIE?

What revision is the last stable release - also for XP/Vista/W8/W8.1?

---

Edit: title change (&change back) ("Latest stable version [...] more and more crippled ...") (due to inability to login at several sites – due to having turned cookies off) ...



Edited 2 time(s). Last edit at 05/29/2021 11:38AM by Voltaire.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 26, 2020 05:26PM

The problem is on Gecko engine until some version I can't recall. There is a long discussion at bugzilla started back several years ago... It was fixed recently though. Even on official K-meleon 76 Gecko version happens.

It happens on Seamonkey and Firefox as well.

The problem lies in the dumb idea from some SEO that thought back... whenever... that adding an onload on a <link> tag loading stylesheets would make the page load faster as the CSS isn't applied to the screen media while there are other elements loading

There is no fix unless javascript is disabled OR, I didn't dare to ask, some advanced developer like kriss_88 is able to make an addon to modify these pages and remove the onload on all <link> tags and then, upon load, change the media of that CSS to screen.

This dumb web pages programming trend is making K-meleon absolutely obsolete for certain pages and is most responsible of K-meleon freezes and hangs.

I just had to have a quick look on heise.de to see that that is the exact problem.

I figured out all this recently, when a site I visit regularly started to have this behaviour.



Edited 3 time(s). Last edit at 12/26/2020 05:32PM by JohnHell.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: siria
Date: December 26, 2020 06:31PM

heise.de was discussed on msfn some weeks ago, and roytam1 made a FIX in the engine, for NM27. Since KM shares the same engine, it should work in KM too. But obviously can only work in KM-Goanna76 builds since Nov 2020 smiling smiley

For self-help in older versions this pref was confirmed to help (if I got it right):
javascript.options.strict = true

(Also helps an a few other sites, sadly not all)

Other good ideas:
Block iframes from other domains (usually ADS):
permissions.default.subdocument = 3
(since awhile also found in KM-settings F2, in KMG76, or try macro priv3buttons, or permdefs)

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 26, 2020 07:03PM

But on MSFN they talk about a crash, not a freeze.

And as they are talking about newer engine, no, it is not the same.

Talking about 75.1 and a freeze, on heise.de, is what I told about the load of stylesheets. The pref does not make a difference. By default is false and since I can't remember I had it set to true.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: anonymous
Date: December 26, 2020 09:21PM

@JohnHell
CSS rules in userContent.css can replace incompatible link attributes.


Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 26, 2020 09:31PM

Remove attributes?
EDIT: remove element attributes? Isn't userContent.css only for display properties?

O_o

Don't be so intriguing xD. Tell how in the same post XD

EDIT 2: can't find any reference about this on the web, yet :-?



Edited 2 time(s). Last edit at 12/26/2020 09:40PM by JohnHell.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: siria
Date: December 26, 2020 09:57PM

Yeah, please post a working example.

E.g. how modify such a heise file by CSS??
<link href="/assets/xxxx.css?12345678" media="print" onload="this.media='all'" rel="stylesheet" type="text/css">

I only get as far as:
link[rel="stylesheet"][media][onload] {...and then??...}

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: Kris_88
Date: December 27, 2020 10:30AM

The problem can be solved by adding a polyfill:

document.addEventListener("load", function (evt) {
if(evt.target.tagName=='LINK') evt.target.onload=null;
}, true);


or more selectively, for www.heise.de only:

if(window.location.hostname == 'www.heise.de')
document.addEventListener("load", function (evt) {
if(evt.target.tagName=='LINK') evt.target.onload=null;
}, true);




http://kmeleonbrowser.org/forum/file.php?9,file=2037,filename=polyfill_om_3.zip

http://kmeleonbrowser.org/forum/read.php?9,153735



Edited 3 time(s). Last edit at 12/27/2020 11:02AM by Kris_88.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: anonymous
Date: December 27, 2020 04:39PM

@JohnHell
The idea was to identify the origin of the problem by adding a compatible replacement to userContent.css and blocking the original.

@Siria
Never tried. Your newest browser should not freeze because a ported patch from bug 1203973 is included.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 27, 2020 06:24PM

Quote
anonymous
@JohnHell
The idea was to identify the origin of the problem by adding a compatible replacement to userContent.css and blocking the original.

The original is a link with an href attribute. How would you block with userContent.css the load of a link's href element attribute and than replace it?

The idea is fine, but what I'm interested in is in the fact and the ability to do that, as you seem to point userContent.css could do that.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: siria
Date: December 27, 2020 07:30PM

Quote
anonymous
@Siria
Never tried. Your newest browser should not freeze because a ported patch from bug 1203973 is included.

Frankly haven't tried myself, since it needs oh-so-risky JS, and no urgent need myself.

But that doesn't mean that you couldn't still post an example rule for other users, or in my case, for other website uses smiling smiley

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: anonymous
Date: December 28, 2020 07:56PM

@JohnHell
Of course, CSS rules can't block tag attributes. Deleted too much from that line as usual. CSS rules in userContent.css can replace incompatible CSS rules that existed before userContent.css is added and after that scripts or events can add incompatible CSS rules again.
Now that the problem is known, you can add the lines Kris_88 posted to an addon or one of the js files in components that add and remove observers for different events. Keep in mind that your configuration has no tabs and Kris_88 uses jsb.OPEN_NEWTAB in SetMenuCallback, ignoring OPEN_NORMAL, OPEN_NEW and OPEN_BACKGROUND.

@Siria
There is no such rule.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 28, 2020 10:35PM

Quote
anonymous
@JohnHell
Of course, CSS rules can't block tag attributes. Deleted too much from that line as usual. CSS rules in userContent.css can replace incompatible CSS rules that existed before userContent.css is added and after that scripts or events can add incompatible CSS rules again.

Language is a barrier when is not our mother language, but

Quote
anonymous
@JohnHell
CSS rules in userContent.css can replace incompatible link attributes.

tell me that you weren't suggesting there that HTML <link> tag element attributes, not the CSS properties, could be replaced by userContent.css.

"Of course CSS rules can't block tag attributes", of course I knew, but you were so confident about attributes that... we had to ask, and I'm not the only one who understood that.



Quote
anonymous
Now that the problem is known, you can add the lines Kris_88 posted to an addon or one of the js files in components that add and remove observers for different events. Keep in mind that your configuration has no tabs and Kris_88 uses jsb.OPEN_NEWTAB in SetMenuCallback, ignoring OPEN_NORMAL, OPEN_NEW and OPEN_BACKGROUND.



If you meant the link for view JS, whatever the developers (aka Dorian) made there, on "Windows only" K-meleon setup, "tab open commands", not only in jsbridge, are converted to "window open commands", when whatever for open tabs is not available. Those with C knowledge, sure could find the answer to this behaviour in K-meleon source code.

But I don't know why are you telling me that now :-?



Edited 1 time(s). Last edit at 12/28/2020 10:35PM by JohnHell.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: anonymous
Date: December 28, 2020 11:05PM

@JohnHell
You wrote you "wasted 2 hours on a set menu without success" and "absolute lack of docs" in the extensions thread. I hope you found a solution.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: December 29, 2020 03:08AM

I spent my time, since, on more needed and gratifying tasks.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: Voltaire
Date: March 27, 2021 11:14AM

Sorry to bother – but it's still not clear what to alter in what file and where those files are that have to be altered ...

Quote
Kris_88
The problem can be solved by adding a polyfill: http://kmeleonbrowser.org/forum/file.php?9,file=2037,filename=polyfill_om_3.zip

Adding this to the /browser/extensions/ folder does not seem to avoid the problem ... there is a window "stop unresponsive script" that is appearing – but still needing to kill the process ...



Edited 1 time(s). Last edit at 03/30/2021 10:29AM by Voltaire.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: Mikk
Date: August 04, 2022 05:01AM

Quote
Voltaire
Sorry to bother – but it's still not clear what to alter in what file and where those files are that have to be altered ....
@Voltaire: As I see it, only experts knowing everything about K-meleon and its programming incl. modification processes, the terms etc. discuss about general problems of ordinary users here, as they perfect know what and where to do, where to take the necessary elements etc. And the ordinary users must understand that everything and to be able do it themselves if they want their problem should be solved. That they can understand only bahnhof here, it is another thing.

Years ago I programmed professionally in assembler, particulary also in Basic and Pascal. That means I'm not a complete analphabet in this area. I'm not familiar with the actual developments indeed, but I can much understand if it will be exlpained humanly and rationaly; I could learn also something in this matter and try to help to serach for solutions actively. But this here used "language" - mostly no chance.

It seems, this kind hides perfectly when these wonderfull academically discussed solutions don't work in reality

This hopelesness is very frustrating sad smiley

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: JohnHell
Date: August 04, 2022 06:55PM

What is, in the end, the meaning of your post, that people here don't help?

The answer was already given here, on this thread, above:
http://kmeleonbrowser.org/forum/read.php?1,154148,156416,page=1#msg-154172

True, it lacked that that script snippets should be placed on polyfill.js on that extension.

Also, sorry by my disturbing post on this thread. They hid the real answer. And sorry if no one answered to the latest Voltaire post. We can't be everywhere and I think I forget this, but this is already a year old.

It is not only on the hands that know everything of K-meleon (which surely is not me). True that this technical issues requires the user to have knowledge, not only on K-meleon, but html, css, js, kmm, etc.

RJJIII is already doing a good effort to enhance the docs on the wiki so it makes K-meleon more accessible.

By the way, what does "bahnhof" means? :-?



Edited 1 time(s). Last edit at 08/04/2022 08:46PM by JohnHell.

Options: ReplyQuote
Re: Latest stable version unusable on heise.de with JavaScript
Posted by: RJJIII
Date: August 04, 2022 08:40PM

Mikk, are you having the same issue as Voltaire? If so, can you update to one of Roytam's recent engine updates? The heise.de site works for me on KM 76.4.6.G

If you're stuck on 75.X, Kris_88 and JohnHell posted a solution.

The frustration is understandable, but remember the folks here are all in the same boat. It's just people trying to help each other out.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.