Jump to content

Hiding content in source view with PHP - is this possible?


iconicCreator

Recommended Posts

Hello good people!

I am sitting here wondering how can I dynamically add content to an HTML page using PHP so that the content is not visible when users view page source?

Lets say I have a Nav Bar which contains a bunch of links that goes through out the site.

 

Is there any method apart from include that I can use to add the Nav Bar to the html page but not make the Nav Bar visible when some view page source?

 

I have been using include to help me break down my pages, script and separating content from actual layouts, the problem is you can still view the content in source.

 

I'm just curious if there is such method, not that I would want to be hiding content which is not something I strongly care about but just curious.

 

IC

Link to comment
Share on other sites

No you can't.

 

In order to view a page a browser downloads the source code so it will always be visible.

you can make a horrible mess of the code so it becomes harder to read.. but really it hardly serves any purpose.

 

Thanks, I thought the same but don't know a lot of PHP, was thinking there was a way there.

 

Have a wonderful day!

 

IC

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.