Why not send the page specific variable values with the page. It
doesn't really make sense to place them anywhere else. They don't have
to be javascript, you could use hidden form values or cookie values, to
be inspected by the javascript, although, I think <script> is the
probably the best place for them.