XavierUniversity / V4

www.xavier.edu
1 stars 1 forks source link

Javascript Loading #12

Closed mcmullengreg closed 7 years ago

mcmullengreg commented 8 years ago

Need to identify the best loading pattern for local javascript to ensure it loads in the "footer" of the website for easy access to jQuery or other libraries.

sparks12XU commented 8 years ago

Depending on how things are structured, there could be a default local.js file that local scripts go and is loaded as needed. That would eliminate the need to do any pre-processing at the top of the page only to send it to the bottom of the page.

mcmullengreg commented 8 years ago

As of right now, we'll have header and footer. I've not "established" any other structure to the site and am open to varying ideas.

Since we won't have access to CS during this process I'm debating on using a switch to define the "content" based on a query param.

Once we start actively dev-ing in CS we can readjust the include structures.

sparks12XU commented 8 years ago

Idea: create a scripts directory with a local-scripts.js file for every site/dept etc and by default the file loads even if an empty file.

That would eliminate the need to use cfcontent to move the script to the bottom of the page, doesn't need to check for a script, and portable enough to move to another service using only HTML

mcmullengreg commented 7 years ago

@sparks12XU idea was implemented in 6c53f954f19e4071cdd6ced639795ece05abb144. Seems to allow for a lightweight option for adding localized scripting where we want it.