hide files from inspect element?

3.1k Views Asked by At

General question: Is it possible to hide files from people who may use tools like "inspect element" in Chrome? Or possibly encrypt a file path?

Example Scenario: Lets say I have two clients, client A, and client B. A and B are competitors in the same business and may see a conflict of interest if they find out there individual "brands image" is being developed by the same person. Both clients A and B access their content via a single website - with unique URL's that give them access to there individual html pages. As it stands: Someone from client A, could use a tool like inspect element and find their logo in the "images" folder right along side of client B's logo.

1

There are 1 best solutions below

1
On

Is it possible to hide files from people who may use tools like "inspect element" in Chrome?

No. If you give it to the browser, you give it to the human who controls the browser.

The browser works for the user, not the developer. You can't make it keep secrets from the user.

Someone from client A, could use a tool like inspect element and find their logo in the "images" folder

They could find the URL to their logo … but then what?

right along side of client B's logo

But you aren't going to tell Client A the URL to Client B's logo. There's no reason to. You aren't going to display it on their page.

What are you worried about?

Are you worried that they will remove the filename from the end of the URL and get a directory listing from the server? Turn off directory listings in your server configuration.

Are you worried that they will replace the filename with the name of every one of their competitors one by one? Don't use easily guessable URIs. You could just generate a random string and use it as a directory name in the URL. Put one project in http://example.com/projects/aRACW8dcMayg/ and another in http://example.com/projects/wupzEPBM7jvQ/