If you go on Instagram and check out the site and you look at the frames in (Application > Frames > Top > fb.xdm_frame_https(..) > (…<name of hashed javascript file>.js), you will see that they’ve put this huge script for their “Facebook Cross-Domain Messaging helper” tool. However, they put the script in the middle of a separate html file. I’ve been reading recently about the advantages and situations when one might prefer inlining the script to externalizing it in a separate file for the sake of some performance, but I con’t know why one would make an html file to hold a full script (which is minified so I can’t really read it). Please let me know if you have any idea why they may have done this?
Jason Knight
The less code you use, the less there is to break
My money would be on somebody STUPID being in charge.
There is RARELY a legitimate reason to inline scripting... the only REAL reason is to set values the external script might use.
If it's a page that has anything OTHER than bounce for traffic or a page that gets more than one view, it's a missed caching opportunity. Nothing more, nothing less. Same goes for 99.99% of the time you see style="" used and 100% of the time you see <style>. It's more a matter of developer ineptitude, ignorance, and incompetence than it is much of anything else.
... and yes, massive fixtures of the Internet CAN end up with people that STUPID in charge of things like that. Just because "oh it's instagram" doesn't make it herp that derp any less. SOMEBODY went full Pakled.