# Why can we view source on a web page?

**URL:** <https://boards.straightdope.com/t/why-can-we-view-source-on-a-web-page/687830>\
**Category:** Factual Questions\
**Created:** [May 6, 2014, 7:38pm UTC](https://boards.straightdope.com/t/why-can-we-view-source-on-a-web-page/687830 "2014-05-06T19:38:58Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![yellowjacketcoder](https://avatars.discourse-cdn.com/v4/letter/y/4bbf92/32.png) [@yellowjacketcoder](https://boards.straightdope.com/u/yellowjacketcoder)\
**Post date:** [May 8, 2014, 11:54am UTC](https://boards.straightdope.com/t/why-can-we-view-source-on-a-web-page/687830/21 "2014-05-08T11:54:53Z")

</div>

> [@CookingWithGas](#):
>
> How would a site be able to use a password embedded in the HTML? I am not a web developer but I have dabbled and I can’t figure out how that would work. Did it use JavaScript to validate the password on the client side before sending a page back to the server?

Probably - don’t underestimate how bad security is in many places on the web. Especially for a bunch of middle/high schoolers that are playing a game rather than being security experts. That kind of security flaw was surprisingly common in the mid-90s.

---

<div class="post-metadata">

**Author:** ![ed](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@ed](https://boards.straightdope.com/u/ed)\
**Post date:** [May 8, 2014, 2:38pm UTC](https://boards.straightdope.com/t/why-can-we-view-source-on-a-web-page/687830/22 "2014-05-08T14:38:58Z")

</div>

> [@CookingWithGas](#):
>
> How would a site be able to use a password embedded in the HTML? I am not a web developer but I have dabbled and I can’t figure out how that would work. Did it use JavaScript to validate the password on the client side before sending a page back to the server?

Probably - I worked for a large bank previously, and one of our internal system apps was protected in exactly this way. When I pointed out that you could just turn off javascript in your browser to bypass the check, management told me “that would be hacking, and is prohibited”.

I wish I was joking.

[Previous page](https://boards.straightdope.com/t/why-can-we-view-source-on-a-web-page/687830.md?page=1)
