Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ $script.get('http://example.com/base.js', function () {
})
```

### $script.urlArgs()
As of 2.5.5 it's possible to concat URL arguments (i.e. a query string) to the script path.
This is especially useful when you're in need of a cachebuster and works as follows:

```js
$script.urlArgs('key=value&foo=bar');
```

Please note that Squid, a popular proxy, doesn’t cache resources with a querystring. This hurts performance when multiple users behind a proxy cache request the same file – rather than using the cached version everybody would have to send a request to the origin server. So ideally, [as Steve Souders points out](http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/), you should rev the filename itself.

### Developers

Building a $script environment works like this:
Expand Down