sdleihssirhc — 2010-08-24T15:22:26-04:00 — #1
I've seen this done a few times and just wondered what the purpose was:
Is JS capable of viewing the query string that was used in its own src attribute? Or is that "1234" doing something else?
modtup — 2010-08-25T03:38:14-04:00 — #2
Probably to prevent caching on the browser especially if the JS contains a dynamic JSON or similar data...especially IE which sometimes yields an unexpected if values get was from a cache JS.
immerse — 2010-08-25T07:33:31-04:00 — #3
Like modtup says, it's usually used to influence caching in the browser.
Another use is that if the file is parsed by a server-side language (such as PHP), then the parameter will be available in $_GET.
$value = $_GET['val'];