1

I am developing a website page on brave when I noticed unnecessary request were made to the server. So I have tried narrowing the case down to this demo over here to reproduce the weird behavior.

Ref: https://github.com/brave/brave-browser/issues/6863

Expectation

A standard <img src="..." /> tag should request the said resources only once.

The problem

The page request the same URI twice.

Each request you see on this image below returned 2 different image. Only the first one were rendered on the screen. Yet The second request do fetch another completely different image from the server.

Annotation 2019-11-10 102409

The weird part

The problem only happen when the <img> tag is in between two heading / paragraph tag. And it will only happen when the first paragraph has more than 4 word. The problem does not happen if the first paragraph has fewer words. That is for me is weird. Yet, this situation is likely to happen on a regular web document.

Reproducing

A simple web page should be able to reproduce the case.

<head>
  <meta charset="utf-8">
  <title>Images</title>
  <meta name="date.modified" content="Sun, 10 Nov 2019 03:01:15 GMT" />
</head>

<body>
  <p>0 1 2 3 4</p>
  <img src="https://placeimg.com/160/120" />
  <p>0</p>
</body>

Brave version

I am using Brave is up to date Version 0.70.123 Chromium: 78.0.3904.97 (Official Build) (64-bit)

PS: I hope this issue get solved quickly. Because it may cause large image to be loaded multiple times more than necessary.

Nik
  • 709
  • 4
  • 22

0 Answers0