-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive on noscript tag #5910
Comments
+1 |
Cursory glance, this seems not specific to the |
+1 to @justinribeiro 's findings. I'm not able to reproduce this with the provided steps. On a new preact project with your snippet and |
ok @justinribeiro , it seems to be a problem in the way the app is being served: "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
"build": "preact build",
"serve": "preact build && preact serve",
"dev": "preact watch",
"lint": "eslint src",
"test": "jest ./tests" If I get correctly what you're saying, if the app is served using something other than |
When you look at the contents of your build directory, does the |
@patrickhulce yes, it does |
As I understand it, I'll have to dive a little further into |
I hope you don't mind me using this thread to report another false positive of this same test. I have a classic LAMP application, so server-rendered. The entire page is HTML + CSS, with only JS for some added interactivity. When you disable JS entirely in the browser, the page fully renders just fine. Still it fails this test. I'm not using noscript but I shouldn't have to because JS isn't used for rendering at all. So when reading this description: "Lighthouse disables JavaScript on the page and then inspects the page's HTML. If the HTML is empty then the audit fails. If the HTML is not empty then the audit passes." Somehow it fails to do this. |
@fchristant do you have a public URL for us? |
@patrickhulce Sure, but this is a VM running on my home desktop so it wont be up for long. I'll try to keep it on until you had a look: |
@justinribeiro so you think it may be something in simplehttp2server that is causing the issue? |
Thanks for sharing @fchristant I'm able to reproduce the issue there, that's really strange. No immediate ideas on what's causing it... 🤔 |
Looking at the output from both @fchristant url and In the case of |
@justinribeiro does that mean that if I configure the https on the preact app so that it manages to do the TLS handshake then the noscript tag would be picked up and the LH score would be reflected in the app? |
It's a known issue with |
awesome @justinribeiro thanks for all the help. |
Oooooh of course, I forgot about this thank you very much for tracking it down @justinribeiro! #1217 captures this issue as well. I'll go ahead and close, but I'm open to a PR adding this note to the documentation :) |
Just want to confirm that after fixing my http->https redirect on the example site I gave, the audit passes successfully now. |
Summary
I created a new app using preact-cli:
I added a noscript tag in the main component and it is shown when i disable JS however the score on lighthouse is still at 82 and it says that i should add a noscript tag.
The text was updated successfully, but these errors were encountered: