Samples Blog contact support

JavaScript is a programming language supported by most browsers. Wagn uses JavaScript for dynamic page behaviors, from opening and closing cards to submitting forms.


As of version 1.13, all Wagn JavaScript is managed by rules – specifically *script rules.  Any JavaScript and CoffeeScript cards listed in a given *script rule will be included for all pages of cards in the rule's Set


Though there are cases where it's useful to have different JavaScript for different pages, the most common pattern is to put all of your Javascript in the *all+*script rule:

Wagn makes JavaScript loading fast.  Even if you have many JavaScript cards listed in your rule, Wagn will reduce them to a single minimized and fingerprinted file.  And it will automatically update that file when you edit the rule or any of the cards in it.



  • adding ?debug=script to a Wagn url will make it load the files separately, which is useful for debugging


Tickets relevant to JavaScript