• 0

Site's size l


Question

The thing is... Knowing all those php, JavaScript, and CSS Frameworks.... They occupy space... Hundreds of KB in some cases.I know that many of them get cached by the browser after first visit.

Furthermore... If the site is image intensive it will bring a couple more...

So, in today'S standards. How much space is too much for a site? (I Know that with JavaScript I can make images load afterwards)

Thanks a million.

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Under 500kb I always say but it all depends on the site.

With this value I mean the html css and js, images can be so diverse that it's always matter of what kind of site it is.

Though one thing to keep in mind is loading smaller images on mobile sites with js as you said yourself already.

Link to comment
Share on other sites

  • 0

In terms of PHP, PHP files don't get delivered to the browser, only the output they produce. A large PHP framework doesn't equal large output.

Link to comment
Share on other sites

  • 0

In terms of PHP, PHP files don't get delivered to the browser, only the output they produce. A large PHP framework doesn't equal large output.

Thanks for clarification. I had my doubts all this time. 

 

Do you mean a page size? If so then I would say anything above 500KB needs to use deferred loading.

Yup. Thanks for the tip ;)

Link to comment
Share on other sites

  • 0

Unnecessary usage of JavaScript is pervasive, and I'd say it has gotten even worse with all the JS frameworks that you just plug and play. If you have a giant hammer everything looks like a nail. Want to do something? 1st thing most people do is to check if their JS framework has a function/module for it. When the vast majority of the time simple things don't need JS at all, and moderately complicated things can usually be done with much less JS than people actually use. If you're serious about page size keep this in mind. It also helps accessibility when you reduce reliance on client side scripting for basic site functionality.

Link to comment
Share on other sites

  • 0

when i was in school learning web development (and dialup was still a popular method of internet connection) the rules of thumb was each page could not be larger than 300Kb in size or the consumer would get bored waiting for it to load. These days i see web pages (including Neowin on some page) that are over 1Mb in page size.

Link to comment
Share on other sites

  • 0

It's not so much the size of the assets. Gzip will compress a lot of stuff.

The number of requests can kill the feeling of speed/responsiveness on a site. If you have 1 image at 200KB it's likely better than having 15 or 20 images smaller ones that add up to 200KB.

 

Another rookie mistake is top loading javascripts in the <head> and having inline scripts or inline styling. Neowin does plenty of this...lol.

Link to comment
Share on other sites

  • 0

It's not so much the size of the assets. Gzip will compress a lot of stuff.

The number of requests can kill the feeling of speed/responsiveness on a site. If you have 1 image at 200KB it's likely better than having 15 or 20 images smaller ones that add up to 200KB.

 

Another rookie mistake is top loading javascripts in the <head> and having inline scripts or inline styling. Neowin does plenty of this...lol.

well the top-loading javascript thing is not so clear cut, depending the particular circumstances. If I had to choose I'd throw all my scripts in the header too instead of scattering them around where they're actually used. It just looks nicer at a negligible performance cost with modern internet speeds. It's not like where you have to worry about additional assets that have a risk of not existing.

Link to comment
Share on other sites

  • 0

well the top-loading javascript thing is not so clear cut, depending the particular circumstances. If I had to choose I'd throw all my scripts in the header too instead of scattering them around where they're actually used. It just looks nicer at a negligible performance cost with modern internet speeds. It's not like where you have to worry about additional assets that have a risk of not existing.

 

You wouldn't have to scatter them around necessarily, just put them at the bottom. Any sufficiently accessible site should be perfectly usable without JavaScript loaded immediately ;)

Link to comment
Share on other sites

  • 0

You wouldn't have to scatter them around necessarily, just put them at the bottom. Any sufficiently accessible site should be perfectly usable without JavaScript loaded immediately wink.png

 

hmm I guess I never thought of that. For what little I actually do, I just avoid using JS at all, so it never actually comes up as an issue for me. It's surprising how much JS is completely unnecessary with just a bit of googling for CSS tricks.

Link to comment
Share on other sites

  • 0

It's not so much the size of the assets. Gzip will compress a lot of stuff.

The number of requests can kill the feeling of speed/responsiveness on a site. If you have 1 image at 200KB it's likely better than having 15 or 20 images smaller ones that add up to 200KB.

 

Another rookie mistake is top loading javascripts in the <head> and having inline scripts or inline styling. Neowin does plenty of this...lol.

I believe they do that because they use a CMS... and little can be done in those circumstances.

Link to comment
Share on other sites

  • 0

I believe they do that because they use a CMS... and little can be done in those circumstances.

Where I work we have our own CMS for our client sites...perfectly possible to put JS at the bottom before the closing tags.

Link to comment
Share on other sites

  • 0

Where I work we have our own CMS for our client sites...perfectly possible to put JS at the bottom before the closing tags.

Yeah but when you update a cms it can undo that again and again after each update which makes it just extra work every update which is not worth it sometimes.

 

And some js needs to be loaded as fast as possible because the site layout looks like a mess otherwise. As example jquery code that makes columns out of a list of picture elements, we don't want users to look at a messy list of elements that hasn't been sorted yet by js for a few sec.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.