Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

cache assets #516

Merged
merged 2 commits into from
Aug 17, 2017
Merged

cache assets #516

merged 2 commits into from
Aug 17, 2017

Conversation

dannycoates
Copy link
Contributor

@dannycoates dannycoates commented Aug 16, 2017

I have no idea what I'm doing!

...but it works.

fixes #389

package.json Outdated
@@ -99,13 +106,12 @@
],
"scripts": {
"precommit": "lint-staged",
"clean": "rm -rf dist",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may or may not work on Windows. Can't remember if we need rimraf for cross-OS compatibility.

}
]),
new HtmlPlugin({
filename: '../views/index.handlebars',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just rename all the ../views/*.handlebars to *.hbs, for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda went this way to distinguish between the two


<script src="/jsconfig.js"></script>
<script src="/polyfill.min.js"></script>
<script defer src="/l20n.min.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these 3 <script> tags need to be in the <head>, or can we move them to the end of the <body> tag? In my very unscientific testing, this had a decent sized performance improvement when testing locally using Lighthouse, but that isn't always a great measure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They shouldn't need to be in the head. worth a shot

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed as #532

@@ -0,0 +1,71 @@
<!DOCTYPE html>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files have a fair amount of boilerplate now, w/ header and footer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah... I'm gonna try to bring back the main layout

@dannycoates dannycoates force-pushed the cache-assets branch 5 times, most recently from d0689e3 to faf2f6a Compare August 16, 2017 16:53
@dannycoates dannycoates changed the title WIP: cache assets cache assets Aug 16, 2017
@dannycoates dannycoates force-pushed the cache-assets branch 4 times, most recently from 18af2ff to a947334 Compare August 16, 2017 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static assets miss caching headers
2 participants