-
Notifications
You must be signed in to change notification settings - Fork 48
Why doesn't ReqestReduce Merge all the scripts together and put them at the bottom of the page?
I wish I could. Or even better, I also wish I could load them all asynchronously by dynamically adding a script element or even deferring the loading until after the page loads. However, RequestReduce knows nothing about the javascript it is about to process. So in line with RequestReduce's reducing strategy, it opts for the safest approach. It will leave the script exactly where it is. It will never move the script in relationship to other elements on the page except for comments and tags. This means that if you have scripts that are not eligible for processing and you two scripts that are. One is above the two unqualified scripts and the last is below them. The two eligible scripts will not be combined together. If you want these two scripts merged and you know that the bottom one is not dependent on the two scripts in the middle, it would be best for you to have the scripts be adjacent to one another. In future releases, I intend to provide means of "hinting" to RequestReuce that it is ok to defer loading or load asynchronously.