Jump to content
scalemates

Remove fl.js for better JS performance

Recommended Posts

Hi,

Background:

All the banners I server are either images or HTML and there is 0% chance I serve flash.

While doing a performance review of my JS code I noted the standard Revive JS code (served via /asyncjs.php) contained a whole section of JS referencing ShockwaveFlash.ShockwaveFlash

Checking the asyncjs.php source I see it includes a reference to a required flash config file (fl.js in the /www/delivery folder)

require __DIR__.'/'.$GLOBALS['_MAX']['CONF']['file']['asyncjsjs'];
require __DIR__.'/'.$GLOBALS['_MAX']['CONF']['file']['flash'];

I currently commented out the inclusion of the fl.js so the JS is smaller. All seems to work fine.

Results

  • asyncjs.php goes from 3.6KB to 2.0Kb when transferring over the wire (GZIP). (not massive, but with Chrome never slow mode, you only have a certain budget of JS available. Saving 1.6Kb here can help to stay under the 500kb limit)
  • 9883 bytes to 42993 bytes in unzipped format. (this is less JS code to parse/execute. Read The Cost Of JavaScript In 2018 for more details https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4

 

My 3 questions for the community are?

  • Do you know any side effects of removing the fl.js inclusion? 
  • Are there better options than commenting it out?
  • Are there other JS optimisations you are aware off?

Thank you

Tim

 

Edited by scalemates

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...