Skip to content

Don't need values for async/defer on HTML5#11359

Merged
rdeutz merged 1 commit intojoomla:stagingfrom
mbabker:async-defer
Aug 13, 2016
Merged

Don't need values for async/defer on HTML5#11359
rdeutz merged 1 commit intojoomla:stagingfrom
mbabker:async-defer

Conversation

@mbabker
Copy link
Copy Markdown
Contributor

@mbabker mbabker commented Jul 29, 2016

Summary of Changes

In HTML5 we don't need to specify values for the async and defer attributes on script tags. So, save a few characters in the HTML output, don't send them.

Testing Instructions

Pre-patch when adding an async'd script the output should be similar to this:

<script src="/templates/joomla/js/template.js" async="async"></script>

Post-patch, it should look like this:

<script src="/templates/joomla/js/template.js" async></script>

@n9iels
Copy link
Copy Markdown
Contributor

n9iels commented Jul 30, 2016

I have tested this item ✅ successfully on e0cca7b


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11359.

@brianteeman
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on e0cca7b

On review


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11359.

@brianteeman
Copy link
Copy Markdown
Contributor

Rtc


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11359.

@jeckodevelopment
Copy link
Copy Markdown
Member

No labels...
@joomla-cms-bot please RTC

@mbabker
Copy link
Copy Markdown
Contributor Author

mbabker commented Jul 30, 2016

The bot, like me, is taking today off to drink excessively

On Saturday, July 30, 2016, Luca Marzo notifications@github.com wrote:

No labels...
@joomla-cms-bot https://github.com/joomla-cms-bot please RTC


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#11359 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfof6S_VRB69c3B-TMP3LGEP7bb86bks5qa5JNgaJpZM4JYhfS
.

@jeckodevelopment
Copy link
Copy Markdown
Member

It's saturday, maybe it's on holiday :)

@brianteeman
Copy link
Copy Markdown
Contributor

I think there might be a bigger issue. Over the last few days I have
sometimes clicked on a link to an issue in an email and only ended up on
the home page pf the tracker and not the issue and then when I click on the
issue directly I only get the home page

On 30 July 2016 at 19:08, Luca Marzo notifications@github.com wrote:

It's saturday, maybe it's on holiday :)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#11359 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8c5pcgBZ-nbQNvtjfGS5wZA6h5xlks5qa5MIgaJpZM4JYhfS
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@brianteeman brianteeman added RTC This Pull Request is Ready To Commit PR-staging labels Jul 30, 2016
@brianteeman
Copy link
Copy Markdown
Contributor

Adding it manually seemed to have worked

@brianteeman brianteeman added this to the Joomla 3.6.2 milestone Jul 31, 2016
@piotr-cz
Copy link
Copy Markdown
Contributor

piotr-cz commented Aug 1, 2016

I wouldn't change the attributes, as ATM it's possible to serve document as XHTML5.

There is no harm in keeping it how it is.

@mbabker
Copy link
Copy Markdown
Contributor Author

mbabker commented Aug 2, 2016

You have to explicitly call $doc->setHtml5(true); to cause this change to happen. So if you're using XHTML5, I'd say you wouldn't be calling this so the attributes wouldn't change in that case.

@piotr-cz
Copy link
Copy Markdown
Contributor

piotr-cz commented Aug 2, 2016

Well, I'm for full HTML attributes, just like closing all HTML tags (which is not required in HTML5).
But I'm aware it's more a personal aesthetics related opinion.

@rdeutz rdeutz merged commit 6cdb20a into joomla:staging Aug 13, 2016
@brianteeman brianteeman removed the RTC This Pull Request is Ready To Commit label Aug 13, 2016
ggppdk pushed a commit to ggppdk/joomla-cms that referenced this pull request Aug 19, 2016
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants