edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] js circumvented
@ 2015-10-01 10:24 Karl Dahlke
  2015-10-02  7:07 ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-10-01 10:24 UTC (permalink / raw)
  To: Edbrowse-dev

Q. How can you read local files on your computer,
that aren't in html, and still run out of js memory?

a. If those files are very large, and in a format like pdf or some such
that is turned into html and rendered, then you may have megabytes of html,
all turned into js nodes, even the individual words turned into text nodes.
And yet there is no javascript in the generated html,
and it's all a waste, even slows down performance
even if you did have memory for it.

I think I should write a routine to detect the lack of js
ahead of time and disable it for this session.
Honestly it's easy to do.
loop over tags, if there is no <script>,
and if none of the tags have onclick onchange onload etc attributes,
and I already set flags based on these attributes,
so if none of these flags are set, then js is never going to run,
so just turn it off.
I'll probably go ahead with this, as people are already requesting it,
unless other people think it is a bad idea.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] js circumvented
  2015-10-01 10:24 [Edbrowse-dev] js circumvented Karl Dahlke
@ 2015-10-02  7:07 ` Adam Thompson
  2015-10-02  7:21   ` Karl Dahlke
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Thompson @ 2015-10-02  7:07 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

On Thu, Oct 01, 2015 at 06:24:10AM -0400, Karl Dahlke wrote:
> Q. How can you read local files on your computer,
> that aren't in html, and still run out of js memory?
> 
> a. If those files are very large, and in a format like pdf or some such
> that is turned into html and rendered, then you may have megabytes of html,
> all turned into js nodes, even the individual words turned into text nodes.
> And yet there is no javascript in the generated html,
> and it's all a waste, even slows down performance
> even if you did have memory for it.

Yixe.

> I think I should write a routine to detect the lack of js
> ahead of time and disable it for this session.
> Honestly it's easy to do.
> loop over tags, if there is no <script>,
> and if none of the tags have onclick onchange onload etc attributes,
> and I already set flags based on these attributes,
> so if none of these flags are set, then js is never going to run,
> so just turn it off.
> I'll probably go ahead with this, as people are already requesting it,
> unless other people think it is a bad idea.

Definitely, please make this happen, with the change that it should be per page not per session I think.
For example, I may look at a huge pdf,
and then browse to a URL within afore mentioned pdf from the same session.
If js is auto-disabled by the pdf for that session then it would stay disabled
for the web page which is probably not what I want,
whereas if the check is done per page then it'd re-enable itself when I change page.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Edbrowse-dev]  js circumvented
  2015-10-02  7:07 ` Adam Thompson
@ 2015-10-02  7:21   ` Karl Dahlke
  2015-10-03 19:08     ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-10-02  7:21 UTC (permalink / raw)
  To: Edbrowse-dev

> For example, I may look at a huge pdf,
> and then browse to a URL within afore mentioned pdf from the same session.
> If js is auto-disabled by the pdf for that session then it would stay disabled

No it becomes active again, technically it's a new window on the stack.
You can even M2 (capital M) and that web page still has js,
while the original pdf does not.
It works as you would want it to.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] js circumvented
  2015-10-02  7:21   ` Karl Dahlke
@ 2015-10-03 19:08     ` Adam Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Thompson @ 2015-10-03 19:08 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

On Fri, Oct 02, 2015 at 03:21:35AM -0400, Karl Dahlke wrote:
> > For example, I may look at a huge pdf,
> > and then browse to a URL within afore mentioned pdf from the same session.
> > If js is auto-disabled by the pdf for that session then it would stay disabled
> 
> No it becomes active again, technically it's a new window on the stack.
> You can even M2 (capital M) and that web page still has js,
> while the original pdf does not.
> It works as you would want it to.

That's ok then, I was thinking session == buffer but apparently not.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-03 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 10:24 [Edbrowse-dev] js circumvented Karl Dahlke
2015-10-02  7:07 ` Adam Thompson
2015-10-02  7:21   ` Karl Dahlke
2015-10-03 19:08     ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).