I am using Chrome 10 to receive a web service response in XML. The request completes successfully. I then want to view the content of the results.
I go to Inspect Element and see the desired XML. For curiosity, I also view source. I am pretty sure the way Chrome works is that Inspect Element is the correct results.
My issue is that the results in Inspect Element and View Source are different. In fact, Inspect Element gives the correct results while View Source provides an error. The error is an authentication error, so the response is still completing but acting like a failure.
Why are they so different?
There's a powerful tool hiding in your browser: Inspect Element. Right-click on any webpage, click Inspect, and you'll see the innards of that site: its source code, the images and CSS that form its design, the fonts and icons it uses, the Javascript code that powers animations, and more.
View Source lets you look at the HTML or XML source for the page you're viewing. To activate View Source: context-click in the page and select View Page Source. press Ctrl + U on Windows and Linux, or Cmd + U on macOS.
Learning how to inspect elements in a browser is beneficial, especially if you work in IT. Inspect Element lets visitors access and temporarily edit a website's front-end source code, including its HTML, CSS, JavaScript, and image files.
View Source in Chrome sends another request for the file, and since it's not authenticated, it returns the source of the login page. This is different from the way say IE works, where the source is cached and returned when you try to view it.
Inspect Element shows the current DOM's snapshot data. This is what you got from making your initial, authenticated request. So yes, this is the "correct" one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With