Blog

What does the term comes after question mark mean in the src attribute for Javascript

Posted by : Leo T Abraham on 30 August, 2013

We might have noticed that while javascripts are included into an HTML, in the src attribute there might be portion towards the end which is separated by a question mark. For eg:  <script type="text/javascript" src="./js/score.js?reload=true"></script>

What is the meant by the portion coming after the question mark? That is in the above example it is reload=true.

They are query strings which may be used to pass variables to the script.

They are also used to avoid the caching problems.