1

I'm building a jstree tree viewer which ultimately will be behind a firewall and I noticed that my script is calling ga.js from an anonymous function in my top level script.

So how do I disable this an an elegant way without digging through all the JavaScript? I don't think the requests will be satisfied when requested, but it will keep asking for it every time the page loads, which is a nuisance.

This is my code, other than the jquery 1.10, jquery cookie and jtree pre 1.0 boilerplate.

    $("#myTree")
    .jstree({   
            "json_data" : {
               "ajax" : {
                  "type" : "GET", 
                  "url" : "xxxxxxx.cgi",
                  "data" : function (n) {  return { id : n.attr ? n.attr("id") : 0 }; },
                  "success": function (new_data) { return new_data; }
                  "progressive_render" : true
                },
            },
            "plugins" : [ "themes", "json_data", "ui", "checkbox"],
     });
4
  • possibly related: stackoverflow.com/questions/17539053/… Commented Jul 16, 2013 at 23:52
  • can you post the code that has the ga.js in it? Commented Jul 16, 2013 at 23:56
  • I don't see any "ga.js" in what you posted. Maybe you mean there is a <script> from google in the HTML. If so, you could just remove that script tag from the HTML, and then the tracking code won't load. Commented Jul 16, 2013 at 23:57
  • okay false alarm. it looks to be included as one of our standard includes. I wasn't expecting that Commented Jul 17, 2013 at 0:11

1 Answer 1

1

Just do a search for ga.js and remove the call manually. You can comment it out, etc. Once JavaScript is loaded, it will remain in memory, even removing from it from the DOM, will not remove it from memory. I found this our recently. So don't let it load into memory is my point.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.