Closed (fixed)
Project:
HeadJS
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Jan 2011 at 23:50 UTC
Updated:
19 Feb 2011 at 10:39 UTC
My biggest script-related performance hit is waiting for my ad server. Advertisements are served on my website through javascript placed in blocks. Javascript in blocks and in template files does not seem to be handled by headjs. Is there any technique I can try to have headjs handle the downloading of these block-based scripts as well?
Comments
Comment #1
alexweber commentedThere are 2 possibilities:
1 - I could add a feature to the headjs module to rewrite script tags found in blocks (and elsewhere) - the problem with this is that it is messy and all the regexes could adversely impact performance
2 - You add the javascript manually using drupal_add_js() or drupal_set_html_head() instead of putting it inline in the block
I realize that in Drupal 6 its limited because drupal_add_js() doesn't work with external files.
I guess what I can try to do is rewrite script tags only in the document's head (added by drupal_set_html_head())
How does that sound?
Comment #2
alexweber commentedfixed in dev version, please wait for automatically generated snapshot or beta release later on today!
Comment #3
alexweber commentedclosing due to 2 weeks of inactivity