For external or internal HTML performance (Bootstrap-Modal)

2

I am building a page which will be accessed by a considerable amount of users (5 thousand / day) and as some hosting services charge by mass of data transferred others by the number of requests, this raised me a question: It is better to encapsulate the most requested Data / Registration Forms / Login in a Bootstrap-Modal and those with the least external html access to be rendered in another url?

Qual das alternativas é melhor? 
Detalhes: Pagina de Login e Cadastro (muito acessada) ~3KB
Página de FAQ: (Pouco acessada) ~7KB
Página de TOS: (Pouco acessada) ~30KB
Página de Privacy Policy: (Pouco acessada) ~30KB
    
asked by anonymous 27.12.2014 / 18:01

1 answer

3

If you are paying for data that is transferred I suggest you do the following:

  • Packaging and Minimizing css Files
  • Packaging and Minimizing js Files
  • Avoid inline css. always use in separate file
  • Use frameworks such as the Backbone or Angle to load information that is populated on the screen. Ex. Grids. So you only traffic json instead of html which is much heavier.
  • use sprite css for images because it reduces the number of requests to the server. I also like to convert the small images to base 64 and put them straight into the css file but this is harder to maintain. If you use visual studio for development you can install webessentials which helps a lot in this, including it minifies css and js files as well.
  • Optimize images to always stay the smallest. I usually use PNG but it is not always better. Take a look here link

Static files like .js, images, .css, and .html are saved in the browser cache and are not always transferred. when they are in the cache the server returns http code 304 (unmodified) this also helps for a smaller data transfer.

I hope I have helped. As I do not know if you work with what technology you work, I will not be able to help you any more. If it is to work with asp.net using iis as server see how to package and minify all css or js files in one.

    
02.01.2015 / 13:05