Way to optimize on export | minimize assets & html lines

Hey Tumult team,

could we get an option that lets us inject the HYPE-*.thin.min.js into the html-file to reduce the overall file size? See the screenshot.

We here at the advertiment corner are sometimes fighting over Kb numbers and File-requests. One sutch a problem is the CDN solution or hosting the *.thin.min.js or adding it to the ZIP file. It does eat up about 60Kb. That is a lot for Mobile Banners.

Any update or possibility for a solution to this would be great.

With kind regards from Germany,

Dennis


Screen: Minified Hype export with all JS-Libraries added into the html-file.

Thanks for the request! I don’t think simply including the file will reduce the overall weight, as it is already heavily minified itself (and in my tests by the best minifier out there!). Most ad restrictions are on zip size, so many folks opt to use a CDN and setup this option in the File > Advanced Export… panel. Is there a reason a CDN wouldn’t be an adequate solution?

One thing to note is that if the document uses physics or needs to support IE, then it should be using the HYPE-*.full.min.js file instead. Hype’s loader dynamically determines this and so serves the smallest file to the user. It is a shame that ad weight measurements don’t take this into account. Also, if you use viewport actions it will also load HYPE-*.waypoints.min.js. I’ll also make a note what files we bring in and when will likely change in v4.

The good news is that if the Hype runtime has already been loaded/included, then it won’t make a request to be loaded again. So in this regard you can just copy/paste the Hype runtime file (using the full one if you know you’ll need IE+physics, and the waypoints file if you use that) into the top of the .html file.

You could even automate this with an export script if you so desired.

(Speaking of export scripts, there is an an option you can set that is exportShouldInlineHypeJS however this really just puts in a <script src=""></script> tag and isn’t what you’re looking for).