I am using Selenium 2 with python bindings to fetch some data from our partner\'s site. But on an average it\'s taking me around 13 secs to perform this operation.
I
Tossing in my 2¢.
Better to use javascript snippets to accomplish.
driver.execute_script(
'document.querySelectorAll("img").forEach(function(ev){ev.remove()});'
);
That will remove the img elements. If you do this right after you load the page, they will have little chance to download image data.
Here is a similar solution I found elsewhere on StackOverflow. (Can't find it anymore)
driver.execute_script(
"document.head.parentNode.removeChild(document.head)"
);