Helpful Information
 
 
Category: Web Design
View Source

Hello,

I'm just wondering what needs to be done so that the "view source" of IE and Netscape displays only the text I want displayed.

Can anyone recommend what books/research needs to be done?


Thanks

View Source does exactly what it says on the tin, views the source of the current document. You can't tell it how much or how little of it to show.

Well, technically, you can, if you want to go hacking the Netscape source code. But that would mean than only the browsers you've hacked will have the mod.

Why do you want to do this? Are you trying to protect your source, or do you want to display your source to users in a certain format?

adam

I'd like to protect parts of it.

Well actually, I ran into a page that did exactly that. I clicked on view source and all I saw was a short copyright page.

I was just curious on how that can be done.

Maybe the entire page was a Java applet.

Well, I've heard of it being done, and people boasting that they can do it, but I've never actually SEEN it.

A lot of the time, people trick you into thinking there's no source by hitting return a lot, so you have to scroll to get at the source. Most people don't notice the scroll bar...

If you don't mind me asking, why do you need to protect it?

adam

[This message has been edited by dahamsta (edited 06-03-99).]

You're probably right about the enter key scroll hide trick.

I'd like make a form with hidden variables and links to other pages.

Well, the only way to hide stuff like that really is to use CGI. You could hide your variables behind less obvious ones and your url's behind keywords. With HTML or JavaScript though, it's pretty much impossible.

adam

You can also use an external .js file.

<SCRIPT language='javascript' src='https://forums.devshed.com/archive/index.php/ext.js'>
</SCRIPT>

scollo's right, you can use external JavaScripts, but that won't stop the detemined SOB's. Most people that will take the time to look at your source will know how to get at the JavaScript file.

Again, for decent security, CGI is the way to go. But I love Perl, so I guess I'm biased... http://www.devshed.com/Talk/Forums/smile.gif

adam

Easy, think PHP Scripting

click_46

Huh? Methinks I'll wait for Zend...

adam










privacy (GDPR)