0

I bought a template and in the main page, it included the javascript file as follow:

<script
    src="thefile.js?v=v1.9.6&sv=v0.0.1"></script>

As you can see there are two argument at the end of the file one is v which I assume is the version and sv which I don't know what is it. When I check the file in one of the w3c validator, It shows error and says that the " & did not start a character reference". Now I have two questions: First what is the sv stands for and second should I remove the & in the script to eliminate the error?

1
  • 2
    Change & to &amp; Commented Nov 16, 2015 at 6:33

1 Answer 1

1

The param ?v=v1.9.6&sv=v0.0.1 indicates a query string, and the browser will therefore think it is a new path from, say, ?v=v1.9.6&sv=v0.0.1. Thus causing it to load from file, not from cache. As you want.

And, the browser will assume that the source will stay the same next time you call ?v=v1.9.6&sv=v0.0.1 and should cache it with that string. So it will remain cached, however your server is set up, until you move to ?v=v1.9.7&sv=v0.0.2 or so on.

& is unrecognized char use its html code "&amp" to avoid errors as mentioned in comment

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

2 Comments

Thank you.And about sv, so I assume it is not a reference to something?
yes, sv might be a keyword which describe type of code in that js file

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.