0

Is there any way if i can load javascript and css files in spring mvc, such that it is not readable whenever someone view source of the web page ?

I want to do this without doing minification.

I also looked for other options like & dont know which one to user.

3
  • This is not a Spring MVC question, as it concerns the ability of a browser user to view resources that are loaded by the browser. Commented May 20, 2012 at 15:11
  • Thanks. Is it possible to load multiple scripts in spring mvc using one tag name ? For ex : Load_all_scripts <script_1><script_2><script_3> Commented May 21, 2012 at 17:52
  • Spring MVC deals mostly with backend code, and JSP coding (taglibs). It doesn't deal with the kind of JS/CSS resource includes you are talking about. Commented May 21, 2012 at 18:26

1 Answer 1

2

NO. Well, not really.

You can't add js and css to the DOM and have it work without being in the DOM. You could dynamically load them, but they will still be visible in the DOM inspector in any browser, but will not be visible to your run of the mill user right clicking and doing view source.

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

2 Comments

is there any way i can load multiple scripts by one tag name by setting any properties or so ?
no, there's no automatic way of doing this through some trick. Do some research on templates and dynamic minification.

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.