My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Why Inline a full Script (Instagram)?

Alex Harrison's photo
Alex Harrison
·Nov 6, 2017

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?