0

Just wanted to confirm. I have an image that has style="display:none;"

So does it still make an URL request? Or does it ignore the request? I need to make a request :) and not display an image :)

<img width=1 height=1 src="http://tracker.mozo.com.au/record_impression/TravelInsurance/1/1/widget_A/1.jpg" style="display:none;">

Jackie Chan
  • 2,654
  • 6
  • 35
  • 70
  • Pretty sure CSS is read after the HTML has been loaded.. Therefore, I am assuming that there is a request, that is then styled not to be displayed.. correct me if I am wrong. – Josh Crozier Sep 05 '13 at 02:18
  • 1
    For future reference you can easily determine this thing by using the net panel in the developer tools for the browser of your choice (or the ever-popular Firebug for Firefox). This is something you should definitely familiarize yourself with. – Mike Brant Sep 05 '13 at 02:29

2 Answers2

1

Different browser define this differently.Check Below. See reference:

  1. Hidden element and HTTP requests

  2. Technique for content specific Images.

Yes if you are making request the system will obey it. Than if you are statically making it display:none it loads in container but is not shown.Talking about the DOWNLOADING part, It depends on browser type.Different browser define this differently.

Ashish Sharma
  • 332
  • 7
  • 32
0

Yes, it makes the request. The browser reads HTML and CSS separately. The src attribute will set the value and the display:none will just hide the element.

bodruk
  • 3,242
  • 8
  • 34
  • 52