Does Too many ids hurt performance

前端 未结 4 613
名媛妹妹
名媛妹妹 2021-01-17 07:59

If I have in the page unnecessary ids on elements, like the HTML Helper does in ASP.Net-MVC.
Does it reduce the performace of my i

4条回答
  •  灰色年华
    2021-01-17 08:59

    While the JavaScript performance will be unaffected, thousands of ids make your HTML bigger, increasing the load time and traffic cost. It's probably negligible (compressing images and other resources is far more important), but may be a route for optimization nevertheless.

提交回复
热议问题