5

I have a VueJs SPA application. Everything is working fine. But when I run chrome lighthouse report, it returns Properly defines charset error. In fact I have added charset in my index.html file.

Here are screenshot of issue.

Chrome light house report

Chrome light house report

Chrome lighthouse issue in best practices

Chrome lighthouse issue in best practices

Code where I added charset UTF-8

Code where I added charset UTF-8

Muhammad Asfund
  • 97
  • 2
  • 10
  • 1
    You should love more the `"` character. Try with `charset="utf-8"`, ans possibly add `"` in all other places (good coding style, but so it is also more compatible with all browsers) – Giacomo Catenazzi Jul 28 '20 at 08:04
  • thanks a lot for replaying @GiacomoCatenazzi. I have added `"`, but webpack remove this string when creating build. I have another application like this one, and its has no this kind of issue. – Muhammad Asfund Jul 28 '20 at 08:07
  • Note: to me, it seems a bug of Google, but maybe there is a special character (that it is not so visible). But so a note: you should copy your text as text, not as picture (so we could test it) – Giacomo Catenazzi Jul 28 '20 at 09:16
  • Here is my HTML structure of my index.html file ` ...... ` – Muhammad Asfund Jul 28 '20 at 09:54

1 Answers1

0

It was service worker issue. I was unintentionally double registering service worker. that`s why its creating problem.

Muhammad Asfund
  • 97
  • 2
  • 10
  • 1
    may I ask you how you discovered this? It has happened to me, too, but in my case I was not registering the service worker twice, but making a test where the service worker called `skipWaiting()` on `install` event and `clients.claim()` on `activate`event. I'm very curious, because I'm doing a correct usage of that scheme and I don't know why the charset test fails! Thanks in advance! – Raúl Núñez de Arenas Coronado Feb 15 '21 at 17:07