August 29, 2013

What does 'x' mean as the last letter in `src` attribute

MyTitle’s Question:

In some projects I noticed that javascripts included into HTML like this:

<script type="text/javascript" src="./js/score.js?x"></script>

What’s mean last ‘x’ symbol?

It is not a symbol. It is a piece of query string like on web scripts it would be something like test.php?reload=true

Such techniques might be helpful to overcome the caching problem as mentioned by SLaks on the comments.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!