all AI news
A simple trick to check how much Tailwind impacts on the HTML size
Sept. 21, 2023, 11:45 a.m. | Cezary Tomczyk
DEV Community dev.to
Follow these steps.
- Go to any page that uses Tailwind.
- Open the developer console.
- Execute code
new Blob([document.documentElement.outerHTML]);
. Notice the returned number. It represents approximately the HTML size. - Execute code
Array.from(document.getElementsByTagName('*')).forEach((el) => { el.className = ''; })
. This removes all CSS classes. - Execute code
new Blob([document.documentElement.outerHTML])
. The number represents the HTML size after all CSS classes were removed.
Calculate how much (%) the HTML size has increased.
array check code css developer document foreach go to html impacts simple trick
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
AI Engineer Intern, Agents
@ Occam AI | US
AI Research Scientist
@ Vara | Berlin, Germany and Remote
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Data Engineer - Takealot Group (Takealot.com | Superbalist.com | Mr D Food)
@ takealot.com | Cape Town