Urgent.News

What's breaking now, across thousands of outlets.

Tech

Half the JavaScript on our static FAQ page never runs, and 98 KB of it is the framework's server code

Our FAQ page is prerendered. It has no form, no widget, no video, and nothing on it changes after it paints. It references 19 JavaScript chunks, 18 of which the browser actually fetches. Earlier today I counted how many of the stylesheet's rules match anything on that page: 213 of 1,250 . This is the same question asked of the JavaScript, with the instrument that does work for JavaScript: V8…

Our FAQ page, which is prerendered and does not change after loading, contains 19 JavaScript chunks, 18 of which are fetched by the browser. A V8 precise coverage analysis revealed that only about half (48.2%) of the 1,131,567 characters of chunk code actually execute. The majority of the remaining code is framework server machinery, making up 98.3% of one chunk and 37.2% of another.

The legal pages, which are simpler and contain less code, have a higher proportion of executed code (51.8%) because they primarily consist of the framework. The 98 KB of server code that is present but not executed adds up to about 8.6% of the page's JavaScript. The user can open a menu, which reveals that a single click on a menu can run a chunk of code seven times more than the initial page load, despite the page being static and unchanging.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to keep track of a Xianyu (Goofish) seller's shop and prices

Xianyu (闲鱼), also called Goofish or Idle Fish, is China's largest marketplace for second-hand goods. Cameras, phones, designer clothes, collectibles: a lot of it shows up there first, often cheaper…

  • Xianyu is China's largest marketplace for second-hand goods.
  • Scraper transforms seller's shop and prices into table format.
  • Costs are based on rows stored, with free items removed after changes.

More from Sunday 8 November →