Asset url
From Shopify Wiki
asset_url(input)
Returns the url for an asset.
Example:
{{ 'shop.css' | asset_url }}
The above example returns the absolute path plus filename of the specified file. In this case it could be something like: "http://cdn.shopify.com/s/files/1/0032/4552/assets/style.css?1255029188".
You will most probably use this url with another filter (to create a link or include tag for instance):
Example:
{{ 'style.css' | asset_url | stylesheet_tag }}
This would be something you would use in the html's head element and would result in something like:
<link href="http://cdn.shopify.com/s/files/1/0032/4552/assets/style.css?125502918" rel="stylesheet" type="text/css" media="all" />
In what file can I use the asset_url filter
You can use the asset_url filter in any .liquid file. So feel free to use the filter in a JavaScript file for example, provided that you have added a .liquid extension to it. Change the file extension from .js to .js.liquid, by renaming the file in your admin, and then you'll be set to point to images in your Assets folder in your JavaScript.
Now, why would you use the asset_url filter in a stylesheet? After all, relative URLs in stylesheets are interpreted relative to the source of the stylesheet, not relative to the document, so why would you need to use absolute URLs there anyway? Answer: you don't need to. However, if you are stuck with a modified image that won't update on your store front, you can use the work-around outlined here which involves using the filter.
Any .liquid file in /assets gets run through the Liquid renderer and the result is saved and sent to the browser with the same name but with the .liquid extension chopped off.

