Unload/load JAVASCRIPT at some url

Discussion in 'Search Engine Optimization' started by m0b1us, Feb 16, 2008.

  1. #1
    hello,
    my web site load slowly and the cause is i load many JAVASCRIPT at header.tpl
    i need to UNLOAD the javascript at all pages and LOAD the javascript if my page is end with 'gallery.html' only.
    how to do this? any idea?
    i've already try

    <?php if(location.hostname.match(gallery.html)) { ?>
    <!-- load the javascript -->
    <script type="text/javascript" ....
    </script>
    <-- end javascript -->
    <?php } ?>

    but i got error message
    Fatal error: Call to undefined function: match() in header.tpl on line 27
    and idea?
     
    m0b1us, Feb 16, 2008 IP