Hi,
Why I want to block a JS file download in HTML? Well, this is my time-chart for the page load:
- jQuery (1.2) loaded
- jQuery plugin loaded (extends the current jQuery object)
- custom JS loaded
- custom JS uses document.write to add extra scripts
- the added extra script loads a new jQuery (1.4, but it doesn't matter)
- -> so my extension is gone since it's a new jQuery object
What I can't do is to put (5) or (3) before (2). I'm working with Drupal (PHP framework) and these are contributed modules. I also can't parse the added script at point (3) because it uses document.write.
So I thought maybe I could deny the download of the 2nd jQuery script. Currently I've no other idea. But that might be impossible. What do you think?