Preventing some source code from being viewed

Hello experts.

I'm hoping you may be able to help me with an issue with Firefox.

We use an online reporting system called Dapresy and we use it to provide our clients with access to their customer data (we run satisfaction surveys).

We want to benchmark these clients against each other using this online system and we want it to be completely anonymous.

We've managed to make a chart that has all the scores on screen and you cannot see which score applies to which client. If you view the source code, it seems to show the source for only a certain part of the page - which is great!

However in firefox, if you press CTRL+A then click "View Selection Source" it shows the source code for the charts and then unfortunately shows the order in which the clients are.

We have the power to edit CSS and we can also put in some Custom HTML into the projects we have in the system.

I know it's probably useless having this without experts knowing anything about Dapresy (the online system), but I didn't know if there was any generic javascript, or CSS or other people who may have come across a way to prevent the "View Selection Source" option.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
What if you obfuscate them before you present them in the chart?

EG:  Have another field called CustomerReportingName in the database.
Populate it with random (unique) data for each client.

Use that instead, now the data means nothing unless you have access to the database.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If it's in the browser there is nothing you can do to prevent people seeing the source
There are js routines that can disable right click on the page but it takes all of 2 seconds to get around it
c lCommented:
the general answer is "no", there wil always be a way to, once a page request has been made, to view that code. There are javascript techniques that you can use to discourage people from viewing source, but those people tech savy enough will generally find a way around those "discouraging" techniques. once the page has been served to the end user, anyone can just locate that page in their temp directory and view it from there.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

INHOUSERESAuthor Commented:
Thanks for the swift responses.

Kyle - It's kind of a WYSIWYG program so we don't have raw access to the databases. We upload data in .sav and one of the options I was thinking of would be to give clients a 5 letter/digit code to represent their company. This would probably change each month to keep it fresh.
This would be a last resort though.

Gary/CL - I thought this would be the case, but if you view the source without selecting then you don't see it. It works perfectly in IE and Chrome because you don't have the function to View Selection Source.
I also added this to the CSS to try and prevent highlighting. This only works properly in Chrome though:

-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

You cant click and drag to highlight in Firefox or Chrome, but you can in IE.
If I could prevent highlighting in Firefox, it may be enough prevention to ensure it's anonymity. Although it's not impossible, it's incredibly improbable that a client of ours would go to such lengths to find out who it who... However the more I can prevent, the better.
It must be loading in a frame or through ajax? Cannot tell from their site since they don't show an example That would explain why it's not directly visible in the browsers view source
The css you have covers all browsers so it should work in IE

Other option is to overlay a transparent div covering the page so you cannot actually select anything.
Kyle AbrahamsSenior .Net DeveloperCommented:
Same approach . . . if the data is in .SAV then update .sav and replace the customer's name with something else.  You're generating the .SAV from somewhere.  

I would NOT recommend trying to just hide the data.  Any JS function can be disabled, and with firebug you can pretty much do anything you want.  The only way to truly secure this is to change / obfuscate the data before it's presented to the user.
If you find a way to do this please notify me and we will patented the method and becomes billionaires.  Seriously, a browser; ANY BROWSER is designed to do exactly what you are trying to prevent.  You can spend all the time and effort you want, but it will be a waste, because if you find something that succeeds you will also have a method that prevents the browser from rendering the page.

On each of my browsers I have a button from an addon.  When I click on the button it list my cache and I can do anything I want with the content from a site.  A common addon?  if you do a search for cache viewer Google will return about 10 million hits listing versions for every browser in the universe.  Given the amount of effort to create that many variations, I would say the demand is high enough that they are commonly in use.  However if you find a way we can get rich in a hurry.

INHOUSERESAuthor Commented:
Probably have to to shelf this then...

The only way is to try and manipulate the data before it's HTMLised.

Looks like "Obfuscate" will be a new word in my vocab.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.