#83 add support for putting scripts just before the closing </body> tag
Merged 8 years ago by mikem. Opened 8 years ago by rayson.
rayson/koji bottom_template  into  master

@@ -18,6 +18,10 @@ 

  

        </div>

      </div>

- 

+ #set $localbottompath=$util.themePath("extra-bottom.html", local=True)

+ #if os.path.exists($localbottompath)

+ #set $localbottom="".join(open($localbottompath).readlines())

+ $localbottom

+ #end if

    </body>

  </html>

Allow themes to insert scripts to the bottom of the generated HTML files.
See https://developer.yahoo.com/performance/rules.html#js_bottom .

Is the existing localfooter not good enough?

Is the existing localfooter not good enough?

@mikem

Modern browsers are smart enough and won't block the rendering process before seeing the closing </div>s.

For Koji it is okay to place <script> tags to localfooter since there is no additional open tags or content after that. And some profiles I did show it makes no difference.

Placing scripts to the bottom of the page is just to ensure all DOM elements are loaded before these scripts for old browsers.

What do you think?

Commit 10b6d1c fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

8 years ago
Metadata