The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V  1 2 >  
Reply to this topicStart new topic
> Image won't display with given name
Robolovsky
post Apr 19 2019, 08:18 AM
Post #1





Group: Members
Posts: 4
Joined: 19-April 19
Member No.: 26,880



I have been coding in HTML for many years and do not understand what is happening.

Please take a look at the following test web page: http://www.snookerlegends.co.uk/imgtest2.html

The page contains two identical images (with slightly different names), each inside a table border. The top one does not display while the lower one does.

The top image is called FP_ad1.jpg and the lower one is called FPad1.jpg (no underscore)

If you check the page source and click the link to FP_ad1.jpg you will see that it does exist on the server so why does it not appear in the page?

The Doc type is HTML 5 but I have tried it with many different Doc types and always the same result.

Even stranger is that if I add any other character after the 1 the picture then does display so FP_ad10.jpg will display

However if I remove the FP and underscore completely leaving ad1.jpg that does not display while ad10.jpg does.

I am completely baffled by this behaviour, I have tried it in different browsers always with the same result. What am I missing?

...Please note the image is an ad for a snooker book. It is not my book nor am I trying to promote it in any way. It just happens to be the image that this behaviour first occurred with...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 19 2019, 11:46 AM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,302
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



They both display for me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Apr 19 2019, 11:50 AM
Post #3


Programming Fanatic
********

Group: Members
Posts: 1,623
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



They both display for me too.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 19 2019, 02:19 PM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



For me three.

Do you use any kind of content blocker, to avoid ads or for some other filtering?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Robolovsky
post Apr 19 2019, 02:58 PM
Post #5





Group: Members
Posts: 4
Joined: 19-April 19
Member No.: 26,880



That is strange. I have an ad blocker in Chrome but it wouldn't know that this image was an add and why would it still display the second one just because I change the name slightly. I have also tested in IE and Firefox with same missing image at the top.

I do use Kaspersky Internet Security so I suppose it is possible that it may be blocking the image but why does changing just one character in the file name or removing the underscore then render it visible. The code for both images is exactly the same otherwise.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Robolovsky
post Apr 19 2019, 03:15 PM
Post #6





Group: Members
Posts: 4
Joined: 19-April 19
Member No.: 26,880



Just tried it with Kaspersky protection paused but the image still fails to appear!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Robolovsky
post Apr 19 2019, 03:17 PM
Post #7





Group: Members
Posts: 4
Joined: 19-April 19
Member No.: 26,880



Incidentally I have tried this on a local server as well as on the web but the result is still the same.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Apr 19 2019, 04:17 PM
Post #8


Programming Fanatic
********

Group: Members
Posts: 1,623
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I tested using Firefox v66 and current versions of IE11 and MS Edge. Both images were shown in all 3 browsers. You do have many validation errors for an HTML 5 document but I don't think that would affect it too much.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 19 2019, 05:10 PM
Post #9


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



When I saved the file at http://www.snookerlegends.co.uk/images/book18/FP_ad1.jpg its size was just 93 bytes. It couldn't be opened by my image editor, but when tried a text editor the following content was shown:

CODE
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

Considering the above, it's strange that the image can be viewed in a browser at all.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 20 2019, 01:08 AM
Post #10


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



QUOTE(Robolovsky @ Apr 19 2019, 09:58 PM) *

That is strange. I have an ad blocker in Chrome but it wouldn't know that this image was an add and why would it still display the second one just because I change the name slightly.


I don't know how Chrome's ad blocker works, but those things sometimes filter on file name, or at least they used to. Your file names contain "ad". Together with the underscore that could be a trigger.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 20 2019, 01:14 AM
Post #11


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



QUOTE(Christian J @ Apr 20 2019, 12:10 AM) *

When I saved the file at http://www.snookerlegends.co.uk/images/book18/FP_ad1.jpg its size was just 93 bytes. It couldn't be opened by my image editor, but when tried a text editor the following content was shown:

CODE
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

Considering the above, it's strange that the image can be viewed in a browser at all.



Opens fine in IrfanView that tends to be picky. Neither do I see any legible characters when I open the image in a text editor. unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 20 2019, 03:24 AM
Post #12


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Apr 20 2019, 08:14 AM) *

Opens fine in IrfanView that tends to be picky.

That's what I used.

Now I tried again, this time it seems I got a proper 153KB image file. Maybe it's something intermittent?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 20 2019, 05:44 AM
Post #13


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



Oh, I didn't think about the file size you got the first time. So that file became broken in the download attempt and an error message, HTML and all, was somehow injected to it. How on earth can that happen? ohmy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 20 2019, 08:55 AM
Post #14


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Apr 20 2019, 12:44 PM) *

So that file became broken in the download attempt and an error message, HTML and all, was somehow injected to it.

Not sure if the actual file is broken, looks more like a server-side response.

QUOTE
How on earth can that happen? ohmy.gif

Maybe it's because I was using Tor browser. blush.gif Assuming that browser doesn't cache anything, maybe it had to request another copy of the file for the file downloading (and failed to notice that the server instead sent a 403 page).

Doesn't explain the OP's problem, though.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 21 2019, 05:34 PM
Post #15


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



Nah...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 22 2019, 03:17 AM
Post #16


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



QUOTE(Christian J @ Apr 20 2019, 03:55 PM) *

Doesn't explain the OP's problem, though.

Or maybe it does. If the image is embedded in an IMG element you won't notice the 403 response, it will just look like an ordinary missing image in the browser. You need to load the image directly (like I did) or use the browser's network inspection tool to see the server's HTTP response.

Strange that it happens every time for the OP though.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 22 2019, 05:55 PM
Post #17


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



Why would the 403 be sent in the first place?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 23 2019, 03:59 AM
Post #18


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



Maybe something on the server is configured incorrectly? Say, an anti-leech directive in a .htaccess file? I guess it could be anything.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 23 2019, 05:41 AM
Post #19


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,312
Joined: 9-August 06
Member No.: 6



That targets the OP's browser? Sounds far-fetched to me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 23 2019, 06:47 AM
Post #20


.
********

Group: WDG Moderators
Posts: 8,179
Joined: 10-August 06
Member No.: 7



Now I got a 403/Forbidden response even from the HTML page http://www.snookerlegends.co.uk/imgtest2.html unsure.gif

When I changed IP (Tor circuit) the page suddenly worked, then I changed IP again and got another 403. Maybe the site uses an IP blacklist? Lots of sites do block Tor exit node IPs due to abuse.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th July 2019 - 12:20 AM