yourhead / s3

public info about s3
8 stars 7 forks source link

User setting to externalize libraries #767

Open joeworkman opened 6 years ago

joeworkman commented 6 years ago

We have page scoped libraries so that a library can get loaded once across multiple stacks. Right now all of the libraries are inserted at the top of the stacks_page_bla.js file.

It would be interesting if there was a user preference for if those libraries were loaded as external files and loaded via script tags. Each library would get its own dedicated JS file.

With the advent of HTTP/2 becoming more prevalent, these JS and CSS files will be loaded simultaneously providing faster page download and processing. It would also allow for browser caching if that same library was used on a different page on the website.

There are already settings related to Font Awesome and jQuery libraries so I think that this is not a far stretch for power users.

The default setting should be the current behavior of course.

yourhead commented 5 years ago

can you provide a link that gives me some info about this, i just don't know at all what you're talking about.

joeworkman commented 5 years ago

This is the best HTTP2 article that I have read... https://kinsta.com/learn/what-is-http2/

yourhead commented 5 years ago

yes, i've read about http2. i just don't know what the heck feature you're asking me to implement in stacks. i've not read about anything that loads library from script tags or whatever -- can you explain a bit more specifically what you'd like, or point to things in that thousand page site that might help me understand?