Re: How do I get HTML sent to server?



On Jun 16, 9:57 pm, VK <schools_r...@xxxxxxxxx> wrote:
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.

This is why btw the infamous Gecko's "phantom nodes" bug #26179
https://bugzilla.mozilla.org/show_bug.cgi?id=26179
remains a sample of unjustified silliness and stubbornness: because it
fights for a careful preservation of sorry leftovers of something that
doesn't exist in the browser's runtime nor accessible from within the
browser.
Someone just wanted to save its time on parse-adding extra spaces in
text/plain paragraphs like
<p>Lorem ipsum
dolor sit amet</p>
and to justify its laziness he brought W3C, traditions, standards and
nearly the Lord himself as a witness to prove himself right. :-\ :-)
An old story but still upsetting and still seriously influencing to
many coding paradigms...

.



Relevant Pages

  • Re: Images not showing in Windows XP
    ... take a look at the HTML source on the client ... browser, and see where the image srcs point to. ... Kevin Spencer ... > value from the session and gets the picture from the DB which is ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: GridView and PagerStyle problem
    ... After the page is rendered is the style applied in the HTML source, ... Should I take care of speciality settings of the browser? ... gridview using the pagerstyle, but the settings are not appleyd at run ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Outputting newlines
    ... Yes, thats true, but you may want to make the HTML source easier to read, then ... Even if the newline isn't displayed when you look at the webpage, ... you look at the HTML source in the browser and it's easier to track down ...
    (alt.php)
  • Re: How to stop source being viewed ?
    ... > Aaron Gray wrote: ... >> How do you stop the HTML source for a page ... >> being viewed on Windows View>Source menu option? ... painfully aware that it is impossible to prevent in any other browser, ...
    (comp.lang.javascript)
  • Re: Marquee For Firefox
    ... The DOM tree can be further manipulated by JS. ... Now where does the DTD or validation come into the ... Only if the HTML is valid can you ... the results of parsing depend on the parser of the browser. ...
    (alt.html)