0

Is there any method to hide or to show an error page ,when a visitor try to access the js and css files from webpage source code?

1 Answer 1

1

No, because the browser needs to be able to load them for them to be usable. The request is exactly the same when the browser loads the JS/CSS file as a part of the page, and when the user tries to access the file directly, you cannot make any distinction at the server. Besides, the user can inspect the already loaded JS/CSS file in the browser without making any additional request to the resource.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.