Prakash Posted March 31, 2006 Share Posted March 31, 2006 Hi I'm Prakash.I'm new to HTML.I've a question. Please send me the reply.I want to hide to HTML code from viewing through the browser, View>Source.How can I prevent the users from viewing the code?Thanks in advance.Bye. Link to comment Share on other sites More sharing options...
Nago Posted March 31, 2006 Share Posted March 31, 2006 Technically, there really isn't a way you can hide this from users, because of the way the internet works- your code is sent upon request to the user when he visits your web address, and then his browser decodes it, and draws the site.If you successfully hid the source from your viewers, you'd also succeed in hiding your webpage from them, as well...There are scripts that prevent "right-clicking", but those get in the way of plenty of things, especially scroll buttons, and I would advise against using them.Maybe you're asking the wrong question. Why would you want to hide your web source? Link to comment Share on other sites More sharing options...
calvin182 Posted March 31, 2006 Share Posted March 31, 2006 yea your chances of somebody stealing your HTML is pretty low. Most people could care less. if you code in only HTML (no php or anything) you could encrypt it into a few lines of javascript. But anyone with the time could decode it. it basically converts tag items into their ASCII equivelents.http://www.designerwiz.com/ad-framer.htm?h...ncryptHTML1.htm Link to comment Share on other sites More sharing options...
snowboard01 Posted March 31, 2006 Share Posted March 31, 2006 ya this site is encripted on some pages.I like to look at pro looking source for ideas on how to lay it out. if u hit cancel on the password screen the code pops up Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted April 17, 2009 Share Posted April 17, 2009 There is no point in hiding HTML code. If you manage to completely block off the View Source option, you can always run the page through the W3C validator and enable Show source.Or you can save the page to your computer and open it in a text editor.I highly doubt you can completely block off the view source. And as someone said, encrypting the code...it only takes a matter of time to decode it. Link to comment Share on other sites More sharing options...
An Alien Posted April 18, 2009 Share Posted April 18, 2009 Yeah, no one steals HTML code really. Most people just look at it to study it. Link to comment Share on other sites More sharing options...
Trotun Posted April 18, 2009 Share Posted April 18, 2009 (edited) Yep, what everyone else says....and to re-ask a question of Nago's: Why would you want to hide your web source?Most people only look at html to study stuff. One thing that's always fun is I would like to know how someone designed a page but I discover code that links out to a css style sheet or some javascrip, etc. If I could I'd love to see the style sheet used.So if you're just trying to hide how you designed the web page's looks you could shoot for that. Dunno why you would but whatever suit ya. =) Edited April 18, 2009 by Trotun Link to comment Share on other sites More sharing options...
fabs Posted April 18, 2009 Share Posted April 18, 2009 you could use frame method. so the viewer just look a frame html code. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted April 19, 2009 Share Posted April 19, 2009 you could use frame method. so the viewer just look a frame html code.All recent browsers have an option that says "View Frame Source" or something similar. Link to comment Share on other sites More sharing options...
thescientist Posted April 19, 2009 Share Posted April 19, 2009 Most people only look at html to study stuff. One thing that's always fun is I would like to know how someone designed a page but I discover code that links out to a css style sheet or some javascrip, etc. If I could I'd love to see the style sheet used.following the path of the CSS file being called is usually a good way of finding it. Link to comment Share on other sites More sharing options...
Trotun Posted April 20, 2009 Share Posted April 20, 2009 following the path of the CSS file being called is usually a good way of finding it.hrm, weird that never worked before. I ended up going to a blank page last time. Didn't find anything when I checked source. Meh, I probably made some silly mistake. :)Thanks Scientist Link to comment Share on other sites More sharing options...
thescientist Posted April 20, 2009 Share Posted April 20, 2009 (edited) in theory it should work, I'm pretty sure I've done it before. Edited April 20, 2009 by thescientist Link to comment Share on other sites More sharing options...
htmlcoder Posted April 24, 2009 Share Posted April 24, 2009 (edited) Yet another way is to push the enter button for about 100 lines, it will seem to not be there, and the browser will "skip" those lines and register only the actual HTML, unless they look at the scrollbar; that is one way to "hide" it! Edited April 24, 2009 by HTML.Coder Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now