Automattic / Automattic/jetpack
DOCTYPE header missing in https://widgets.wp.com/3rd-party-cookie-check/complete.html
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### Steps to Reproduce
1. Go to https://widgets.wp.com/3rd-party-cookie-check/complete.html
2. Open Developer Tools in browser
3. Check Debugger for 3rd-party-cookie-check > complete.html
4. An error shows `This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “”.`
5. Links to here: https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
### A clear and concise description of what you expected to happen.
The document complete.html should begin with ``
### What actually happened
It does not:
```
if (window.parent) {
if (/wpcom-thirdparty-cookie-check=ok/.test(document.cookie)) {
window.parent.postMessage('WPCOM:3PC:allowed', '*');
} else {
window.parent.postMessage('WPCOM:3PC:blocked', '*');
}
document.cookie = 'wpcom-thirdparty-cookie-check=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
```
### Browser
Mozilla Firefox
### Other information

### Platform (Simple, Atomic, or both?)
_No response_
### Reproducibility
Consistent
### Severity
_No response_
### Available workarounds?
_No response_
### Workaround details
_No response_
Contributor guide
Research direction
Start with the complete.html document served at https://widgets.wp.com/3rd-party-cookie-check/complete.html and compare its opening markup with the issue’s example. Done means the document begins with the requested HTML doctype and the page no longer reports Quirks Mode in browser Developer Tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100