Where are JavaScript files deferred from? (Below footer)

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeWhere are JavaScript files deferred from? (Below footer)

This topic has been marked as not resolved.

Hello,

I am looking to add some JavaScript to my website and would like to defer the .js to the bottom of the page to improve the page render speed.

I have tried adding it to the bottom of footer.tpl but after viewing the rendered page source I can see that the existing javascript on the website is included in a file that is below footer.tpl. Do you know which file they are in?

Thank you

June 16, 2015 at 4:25 pm #41494

Hi,

1) If JS cache is off, all theme related libraries (slider, carousel etc.) are loaded just above the closing </body> tag.

2) If JS cache is on, all libraries are combined in a single file and loaded in the header asynchronously.

3) All inline JS is cut and pasted after libraries in the footer (just above the closing </body> tag).

4) Custom theme JS (from Pavilion CP > Theme Settings > Custom > Custom Javascript panel) is processed like inline JS.

If you add some JS file (or code) in catalog/view/theme/pavilion/template/common/footer.tpl, it should stay there.

BR,
ThemeBurn team

June 23, 2015 at 1:48 pm #41623
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.