View sourse

hi everyone

I am new in html java site design so i spend hours peeking at other websites and other websites’ sourse codes just to learn more, and there was one site , i can’t remember the web address now, but i couldn’t open a sourse code, and i thought “WOW this is actually cool” so
my question is where can i find information or a certain code that restricts users from opening a sourse window.

THX