Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can hardly see source in Chrome without the dev tools. The Ctrl+U "functionality" just generates huge HTML document (a table filled with spans to highlight syntax) and it is very slow on large websites (both generating it and rendering I'd assume).



The CTRL-U is just the HTML part of the page. Not the CSS, images, or the other stuff.


Source HTML even, so whatever javascript changed is not there.

But for fun and laughs I saved js-generated source of a pretty big web page, opened it, and then pressed CTRL-U. It took 50 seconds to generate and render the source view. No wonder...

> document.getElementsByTagName('*').length

< 956632

(should be fun to go deeper and save this html, and then go ctrl+u on that)

edit: Tried it and it's been choking on the next "level" for the past 9 minutes. The tab is at over 1.5GB memory, I'm going to kill it.


I'm using Chrome and pressed Ctrl-U. Nothing happened. What was supposed to happen?


Usually, a new tab opens whose address is "view-source:$URL_OF_PREV_PAGE". Obviously, it's not terribly hard to replicate by hand, but that's weird. As has been said since the days of old, "it worked on my machine".


That's nothing to do with Chrome though, that's how the HTML is.


But the idea to generate that huge HTML by javascript to display source is weird. Especially when it takes half a minute for a big web page.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: