4 ms·
Ask HN: Do you still use “view source” to see how web pages work?
- core-questions 7y agoIt's been a while. Time was this was an excellent way to learn, but now everything is minified and obscure and outputted by compilers to make CSS and Javascript out of things that aren't, and all of the idiomatic ways of working with things (replete with limitations) have been replaced with abstracted ways of working with this (ostensibly with fewer limitations). It's clear to me that this is a shit sandwich, and what we should really do is start replacing HTML/CSS/JS with a new app development mechanism that embraces the significantly refined requirements we have now over our 1990s predecessors. Ideally the end result is as easy to build and take apart as the old web used to be.
- dewey 7y agoIt’s less “view source” and more the network tab in the inspector but I’m using that one a lot to find APIs to use.
- davismwfl 7y agoSure, I do it quite often. Chrome will format the code if it is minified so that is easy, and you can quickly jump around and see what is happening. If you know your front end frameworks you can pretty quickly tell what they are using and how it is all put together even when code has been obfuscated. I definitely use view source when debugging my own code or testing layout changes I am playing with since it is easy to still adjust the css and view the changes etc. The javascript console is valuable too. I guess for me it is usually less about finding out how things work now so much as debugging an issue or finding a vulnerability. I have found a number of vulnerabilities using view source on products out of China that have built in web servers, like ip cams and the such. *edit -- When I think of view source I think of the complete dev tools, not just the single "view source" tab.
- c-smile 7y agoQuite frequently to get URL of particular image on the page or to get an ID of element to make precise reference URL.
- indentit 7y agoThese days I tend to use the built in element inspector instead to view live state, unless I specifically want to see the original state - from before JS got involved :)