Skip to content

Stats: update Stats script to be valid XHTML#3489

Merged
eliorivero merged 1 commit intomasterfrom
update/xhtml-stats-tracking
Mar 4, 2016
Merged

Stats: update Stats script to be valid XHTML#3489
eliorivero merged 1 commit intomasterfrom
update/xhtml-stats-tracking

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Mar 2, 2016

In XHTML, attribute minimization is forbidden.
async and defer must be defined as <script async='async' defer='defer'>.

Suggested here:
https://wordpress.org/support/topic/doesnt-work-with-xhtml-2

In XHTML, attribute minimization is forbidden.
`async` and `defer` must be defined as `<script async='async' defer='defer'>`.

Suggested here:
https://wordpress.org/support/topic/doesnt-work-with-xhtml-2
@jeherve jeherve added Bug When a feature is broken and / or not performing as intended [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Needs Review This PR is ready for review. labels Mar 2, 2016
@jeherve jeherve added this to the 3.9.3 milestone Mar 2, 2016
@eligrey
Copy link
Copy Markdown

eligrey commented Mar 4, 2016

You can use empty strings (or any value), like async="" defer="" if you're byte-conscious.

@zinigor zinigor added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 4, 2016
@eliorivero
Copy link
Copy Markdown
Contributor

@eligrey it's more self-documented to make the value explicit for the attribute, so we'll stick to async="async" defer="defer" this time. Thanks for your original report on the WordPress.org forum and for following it up here! This is now merged to the upcoming 3.9.3 version.

@eliorivero eliorivero merged this pull request into master Mar 4, 2016
@georgestephanis georgestephanis removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 4, 2016
@eliorivero eliorivero deleted the update/xhtml-stats-tracking branch March 4, 2016 13:59
@eligrey
Copy link
Copy Markdown

eligrey commented Dec 23, 2017

@eliorivero @jeherve This issue has regressed. When site stats are enabled on my site, Jetpack emits async defer instead of async="" defer="" again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants