3 ms·
Why would you need the original HTML for dev tools to work? Maybe there are ones I've never seen but the ones I use are using the DOM rather than the original H
by mullsork 10y ago
Why would you need the original HTML for dev tools to work? Maybe there are ones I've never seen but the ones I use are using the DOM rather than the original HTML string.
- akerro 10y agoI showed a few people who have no idea about programming whatsoever how to hack websites to download .mp4 or .mp3 from source code of the website. How would you show them that using DOM...
- recursive 10y agoIf there's an audio tag, that element exists in the DOM and has a reference to the url where you can download it. Is this a trick question?
- akerro 10y agoYes, my mother doesn't know what DOM is or why there are so many buttons in devtools. ctrl+u -> ctrl+f -> mp3 is much easier to explain and repeat.
- g00gler 10y agoHow would you show them that using the HTML source? You can use dev tools to view the network tab to find whatever URL Pandora is using. You can use dev tools to find a media elements src attribute. To see the JavaScript sources... You check the dev tools. If anything, in the days of JavaScript, the HTML source will missing a few things.
- corobo 10y agoctrl+shift+i, ctrl+f "mp4"
- mullsork 10y agoRight but then you're talking about viewing the HTML source right? In other words "View Source." I'm asking why dev tools would need access to the original source and not the DOM. It doesn't make sense to save the original source in memory to me once it's been parsed.
- gkop 10y agoYou don't typically. One case where you would View Source in addition to using Dev Tools is debugging how the browser is massaging your source HTML into the DOM, for example by inserting missing <tbody> elements. Validating your HTML mostly addresses this (I'm actually not sure about the <tbody> example, I would hope the validator at least issues a warning), but isn't something you necessarily want or can do with, for example, user-uploaded HTML snippets.
- mullsork 10y agoTrue, though I guess using some HTML validation could improve that. Not sure if <tbody> is mandatory but I think I've seen some tool complain about its absence.