Remove YUI Compressor and use plain JavaScript #341
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
YUI Compressor was introduced in 0fabf4d and b7105ca as a means of reducing the number of requests required to render the page. But it has some downsides:
Since HTTP/2 is now widely supported and allows separate files to be multiplexed over a single TCP connection, we should be able to remove YUI Compressor and switch back to plain JavaScript without increasing load time.
To avoid the need to insert version information into JavaScript files, I moved the version information into data attributes in
index.html's body tag.Previously,
build.shupdatedindex.htmlin place, but this made it difficult to work on that file. I renamedindex.htmltoindex.template.html, from whichindex.htmlis now generated.The list of cached CSS & JavaScript files in
service-worker.jshad fallen out of date, so I updated that as well.