Mobile app version of vmapp.org
Login or Join
Hamm4606531

: Page size (HTML) is 200KB. Any problems? I have created a contact form page that is unfortunately kinda big. The HTML size is 200KB. Although I know with everything else considered (images,

@Hamm4606531

Posted in: #PageSize

I have created a contact form page that is unfortunately kinda big. The HTML size is 200KB.

Although I know with everything else considered (images, scripts etc.) most pages are much heavier than this, can I face any issues here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamm4606531

1 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

200KB of pure text should be fine, unless a lot of it is javascript that the browser has to execute. Some browsers or users on slower connections (don't forget about mobile users!) may only see part of the page load initially if the browser takes longer to parse the DOM and figure out what everything is and where it goes. The only real way to find out is to test it on a variety of connections, browsers, and devices.

Generally, though, HTML does not need to be that large, so I would review your code to see if you are following best practices. See if there is any inline CSS that could be converted into style sheets. If you have 100 lines with <input style="width:100px;color:black"> you could cut out a lot of text with a input{width:100px;color:black}, or whatever the case may be. Look into tools for "minifying" your content. There are some other tips for reducing HTML size at this question.

You could also look into splitting the form into multiple steps or using AJAX to load less urgent elements or elements farther down the page. I used to have a page on an e-commerce website that tried to load 10,000 elements into javascript arrays to dynamically change one dropdown based on a change in another. It always took several seconds to load, and it was actually much faster to simply load the initial values and use AJAX to change the contents based on the user's input.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme