: 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,
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?
More posts by @Hamm4606531
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.