Reputation: 1131
I am confused... all the pages start with
<!DOCTYPE html>
<html lang="en">
<head>
<title>...
When I view the source in Firefox, the first line is in italic. Is it commented by FF (last mac version 98.0.1)?
In the web tools console, FF sometimes (not for all the pages) displays a warning saying that the page is in quirk mode and may affect the rendering.
I have read a lot on the subject but I don't seem to understand what I can do to fix this.
Help would be appreciated.
Upvotes: 3
Views: 3795
Reputation: 85
I had this problem with all my pages (in an inherited 20-year-old legacy Web Forms project), and eventually discovered that it only happened for ASPX pages that had been changed (in code-behind) to inherit from a class extending System.Web.UI.Page, instead of inheriting directly as they do by default. For instance, if I change this (code-behind of my page MainPage.aspx):
public partial class MainPage: System.Web.UI.Page
{...}
to this:
public partial class MainPage: MyPage
{...}
where:
public class MyPage: System.Web.UI.Page
{...}
then Firefox will report the page is in Quirks mode. So will Chrome and Edge, though in a rather less "in-your-face" manner.
However, I have not been able to find out whether this will always happen when using indirect inheritance, or whether it is something specific to my extension class. Nor can I tell if this then forces my pages to render in a non-standard way.
Upvotes: 0
Reputation: 11
Is it possible for you to inject an iframe without the doctype or for some third party tracking pixel to do it?
If that's the case, I'm afraid your problem is caused by that, you have an answer to the reason here: Dynamic iframe inserted into document that is standards mode defaults to quirks mode
Upvotes: 1