Compressed version of scripts and styles?

Is there a compressed (or at least concatenated) version of all scripts and styles from h5p libraries? Or how to make one?

The purpose is to be able to attach the compressed version instead of multitude od single scripts, for page performance. There would probably be much unused code in such h5p.all.js file and h5p.all.css, depending on how many libraries are actually used on the page. But still it would be a performance advantage, i think.

falcon's picture

H5P is supposed to handle that automatically for all supported platforms. Are you using WordPress or Drupal? If you use WordPress, have you upgraded to the latest version of the H5P plugin where this was introduced?

I would like to serve h5p content from Drupal server for embedding it as iframe on arbitraty client websites. For this purpose I created a function which basically does the same as h5p_embed() from h5p.module file, but allows to embed multiple contents of various types in one iframe. The original h5p_embed() adds scripts and stylesheets one by one and so does my function. It works fine so far, at least to the extent I've tested, but because serving embeddable content will be the main purpose of this service, I'd like to optimize it for performance.

falcon's picture

It seems you're right. One of the core developers thinks this must be a bug. Have scheduled a fix for this for the June release.