Re: How do I get HTML sent to server?



On Jun 16, 8:54 pm, "MC" <mica[removethis]@aisus.com> wrote:
the main html is served
by a single page but the inner content may come from dozens of servers. We
are trying our best to approximate and document the client view.

You cannot do it in principle unless you have client-side installed
scriptable plugin to take screen snapshots and to submit them to the
server. This is the only way to go I guess if there is a legal issue
involved.
The problem is that the browser - any browser - does _not_ have access
to the HTML source used to render the current page. Yes, sounds crazy.
Yes, anyone can click View > Page Source or equivalent to see the
source: anyone can but browser cannot. What browser can "see" is the
DOM Tree resulted from the parsing algorithms and error correction
mechanics of this particular browser applied to the server HTML
source. Respectively by getting document.documentElement.innerHTML
(the whole page) or document.body.innerHTML (body only) you are not
getting the original source. Instead the browser is "reverse
engineering" for you the current DOM Tree into some HTML code which
is, being reused by this particular browser, should result to a copy
of the current DOM Tree which is by itself is a browser-specific
result of parsing the original HTML source. The results may differ
dramatically as you may guess. For a taste of it try for instance this
code in different browsers:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<p>Hello!
</html>
<script>
window.onload = function() {
window.alert(document.documentElement.innerHTML);
}
</script>

So it is a dead end where you are working with now. Unless you consult
with your legal department and they conclude that server-side provided
HTML source and client-side resulted DOM Tree must be considered as
legally equal entities :-) Actually the question sounds very
California-style. I doubt there are by far precedent cases like "HTML
Source VS. DOM Tree" or "John Doe and Al. VS. Internet Explorer HTML
Parser Document Forgery" and the like but who knows under this hot
sun. :-)

I would still suggest to stop wasting your time for that. Instead buy
yourself a valid code-signing certificate and do either of two:
1) Require extended privileges for your signed script / ActiveX to
make cross-domain calls and to collect the original HTML sources
before rendering them.
2) Better yet make a signed plugin / ActiveX to make screen snapshots
and require to install it for each client.

Both ways are still rather silly in comparison with regular legal
alternatives but at least doable.
.



Relevant Pages

  • Re: How to do a post back when user press enter.
    ... It is hosted on a web server, ... the client browser, which is designed to read and interpret HTML. ... UI, via the event handler. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to do a post back when user press enter.
    ... > requested by a client browser, ... > by an ISAPI (Internet Server Application Programming Interface) ... > and interpret HTML. ... > to its process and UI, via the event handler. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Pure client-side javscript database?
    ... the individual asking the question in their single context. ... in the current browser instance and a respondent assumes the question ... >>> that the client may download an application from a server ... >>> server, but the APPLICATION may or may not be. ...
    (comp.lang.javascript)
  • Another option (was Re: AJAJS - thin client web app using mainly XMLHTTPRequest and eval())
    ... running on the client. ... but is a Web-Server really an Application Server?) ... Password Caching or generic Work-Station or Browser ... Predictive text on the Queue Name field so that all matching VMS queues ...
    (comp.lang.javascript)
  • Re: Still Need desperate help to start with ASP NET - simplified problems - HELP!!
    ... complicate means that there are some hundred thousand code lines ... via web services to the win appication on the server. ... featured application (say thick client) which does a lot of complicate ... to deliver to the IE user, creating a smart client within its browser. ...
    (microsoft.public.dotnet.framework.aspnet)