I have just looked it and noticed that module uses hook_init to add CSS and JS file. I don't think this would be the good way to do this.

Hook_init calls on every request whether it is of ajax request or normal request. So I recommend to add CSS and js files on hook_page_build() so that It will calls only once when page is rendering.

Comments

akashjain132 created an issue. See original summary.

perennial.sky’s picture

Status: Active » Needs review
StatusFileSize
new784 bytes

Here is the patch.

  • helmo committed f124401 on 7.x-1.x authored by akashjain132
    Issue #2798559 by akashjain132: Never add js and css in hook_init
    
helmo’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.