Using jQuery I can get easily the number of DOM elemetns used by a web page:
$(\'*\').length;
But not all web sites are using jQuery.
It's quite simple really:
document.getElementsByTagName('*').length
If you can ignore older browsers, you could also preserve some of the jQuery-like syntax with:
var $; $ = document.querySelectorAll.bind(document); $('*').length;