Can I hide page source on my website without disabling right click and just show a message which replaces html source like the following website?
In a word, no.
If you scroll down the source of that page, the html is there after a load of white-space.
No you can’t hide the page source of one’s website.If you block Right click,F12,There are ways or tools to restore this. One thing you can do is obfuscated the code so that it difficult for the humans to understand.
document.write at the end.
So of course, it does get decoded and does get written to the document and can be viewed and/or copied via “Inspect” in any browser.
The bottom line is: For your browser to show a web page, the code for that page must be presented one way or another at the client side. If there is nothing there, there is nothing for the browser to display.
The only sure way to hide your html code is to not publish it on the internet.
Perhaps if you could explain why you want to do this, @sintex150, we might be of more assistance. It seems an odd thing to be worrying about.
Hi there hnymatc,
I do understand that you you have only recently joined
these august forums, but when posting replies you really
should ensure that your remarks are directed correctly.
You have assumed in your post - ( #4 ) - that it was I who
wanted to hide his source code, when, of course it was the
O.P. @sintex150 who had this ridiculously impossible dream.
This is one of the vagaries of Discourse which has caught out very many members at one time or another.
If I quote from your post, it is correctly attributed. If I quote quoted text from your post, it is attributed to you, even though the original is correctly attributed in your post.
I was aware of that anomaly.
But there was still no reason for @hnymatc to be quoting my
post in the first place, unless he/she was refuting my assertion
Originally HTML was more of a word-processing format; until recently HTML was an “application” of SGML, a word-processing standard. (SGML was derived from IBM’s GML, a set of macros for a word processing system).
No. They are referring to hiding the actual
HTML source code from the
Page Source feature. They probably just looked at the top part of the
HTML source code when viewing it. All they saw was a huge line break gap and assumed it’s possible.
But like everyone else said. Simple answer No.
I will wait for sintex150 to say that.
The OP states it.
See the title:-
Can I hide html source?
You can hide some, by using AJAX.
The only way that you could hide “Source Code” from
@TechnoBear’s eyes, would be to poke them out.
Never poke the bear…
Note that I qualified my response. Using the “view page source” menu after you right-click the page. I also mentioned that “Inspect” will also show it.
Would not think of it.