Question: Optimization: [5 marks] You have a large JavaScript file (over 15MB) loading in the of the page. This is blocking DOM parsing and delaying rendering.
![Optimization: [5 marks] You have a large JavaScript file (over 15MB)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4ec3e6e337_29366f4ec3de76ea.jpg)
Optimization: [5 marks] You have a large JavaScript file (over 15MB) loading in the of the page. This is blocking DOM parsing and delaying rendering. Your visitors are unhappy. (a) Small part (1MB) of the script manipulates DOM, (b) other part (500kB) registers a service worker and (c) rest of it serves complex calculation based on users input. What are the steps you can take to make this script non-blocking? Make sure that your changes don't hamper the original performance requirement of the JavaScript file. Network Security: [5 marks] Imagine that you are developing a messenger app (like WhatApp). It lets users make calls over the Internet. Your requirements are: (i) encrypt data communication for each call. (ii) use a unique encryption key for each couple of users but (i) prevent this key from getting shared over the Internet. (a) How can you achieve this? [2] (b) Briefly outline the algorithm. [3]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
