Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Tip

Helpful Information contained in Browser View Source

Oct 17, 2012 2:49AM PDT

What various valuable information can a browser view source provide? How often do you view a page view source, what are you looking for? Can it give insight into any technology used? Do tools like IEDeveloper and Firebug extract all necessary info related to a page or could the view source have more to tell?

Discussion is locked

- Collapse -
Short answers.
Oct 17, 2012 2:59AM PDT

To see how the page works.
Usually to see why a page hangs.
No.
No.

As to why no to the last question, it's because I've seen those tools fail to grab the linked/embedded/external scripts and more.
Bob

- Collapse -
Answers
Oct 17, 2012 6:41AM PDT

> What various valuable information can a browser view source provide?

That depends on what you find valuable. I find things like HTML elements, CSS styles, JavaScript and fonts valuable, but that may not be of interest to you. This type of information is usually always available, on any site.

Other valuable information might be things that developers added to the code for debugging. You'll most likely never see anything "valuable" on a production site, but it's not uncommon to print statuses or variable contents in the source, to ensure that everything is loaded as expected.

> How often do you view a page view source, what are you looking for?

I view source code almost every day. I'm either looking at source to learn how a particular effect is created, why my styles aren't effecting the desired elements or to see some of the output explained in the previous answer.

> Can it give insight into any technology used?

It can, to some degree. For example, WordPress website tend to have a wp-content folder in which the theme lives. In order to reference theme files, website must reference the folder within wp-content. If you look at the source and see wp-content, there's a fairly good chance that website is powered by WordPress.

This is just one of many examples.

> Do tools like IEDeveloper and Firebug extract all necessary info related to a page or could the view source have more to tell?

Those tools usually make use of information that's already somewhere in the source, but they help with presentation and provide you with some mechanisms for manipulation. They also have built-in tools to make additional requests and changes beyond what's just available in the source code.

~Sovereign