Why Does This Website Show No Source Code?

Explanation of how therickroll.com does not show any source code

Kaustubh Gupta
Jan 10 · 5 min read
Image by Author, Made in Canva

Introduction

Assumptions

therickroll.com

The therickroll.com website screenshot
Source code page for therickroll.com

The Magic of Headers

HTTP response returned for my portfolio website

What if, we somehow include our website code in this HTTP header response? This way the website would be renderd and the code will not appear in the view source tab!

Qs 1: Why does this technique not work in Chrome Browser?

Qs 2: How the website redirects to rickroll YouTube video after 5 seconds?

HTTP response for therickroll.com

Credits

Conclusion

If you want to read/explore every article of mine, then head over to my master article list which gets updated every time I publish a new article on any platform!

Geek Culture

Proud to geek out. Follow to join our +1.5M monthly readers.