Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.

Commit 3ba5808

Browse files
author
Matt Gaunt
committed
Adding an FAQ to readme
1 parent b608d2b commit 3ba5808

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Alternatively, you can just run `npm run monitor`. The application shell should
5151

5252
### Deployment
5353

54-
We've deployed the project to Node.js on [Google Cloud](https://cloud.google.com/nodejs/). To do the same, follow the steps in their Node.js deployment [getting started](https://cloud.google.com/nodejs/getting-started/hello-world) guide and after running `npm install` run `gcloud preview app deploy app.yaml --promote`. If everything works correctly, you should have the project deployed to your custom AppSpot endpoint.
54+
We've deployed the project to Node.js on [Google Cloud](https://cloud.google.com/nodejs/). To do the same, follow the steps in their Node.js deployment [getting started](https://cloud.google.com/nodejs/getting-started/hello-world) guide and after running `npm install` run `gcloud preview app deploy app.yaml --promote`. If everything works correctly, you should have the project deployed to your custom AppSpot endpoint.
5555

5656
## Notes
5757

@@ -69,6 +69,35 @@ There are no hard and fast rules with this architecture, but there are a few got
6969

7070
* In the application shell architecture downloading and adding content can interfere with progressive rendering. This can be an issue for larger JavaScript bundles or longer pieces of content on slow connections. It might even cause performance issues when reading content from the disk. Where possible *include* meaningful page content with the initial download rather than making a separate request for it. In the Wikipedia application, Jake was loading third party content and had to work around this, which is why he used the [Streams API](https://github.com/jakearchibald/offline-wikipedia/blob/master/public/js/page/views/article.js#L86). We strongly recommend reducing the number of requests made for your page content if at all possible.
7171

72+
## FAQs
73+
74+
* Why is there a noscript tag for CSS files?
75+
76+
There is a great deal of content surrounding how to optimize for the
77+
[critical render path](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/?hl=en).
78+
This boils down to, prioritize CSS for the visible viewport on first load
79+
by inlining those styles and then asynchronously load in additional styles.
80+
At the moment the web doesn't have any way to asynchronously load extra CSS
81+
files. The only way you can do it is to use Javascript to add the CSS files
82+
after the page has loaded / started to render.
83+
84+
The reason we have a `<noscript>` tag is that if a user has
85+
disabled Javascript, those extra files, loaded by Javascript, will never
86+
be loaded. Meaning, if you still want the extra styles to loaded when JS
87+
is disabled, you simply add a link to them inside the `<noscript>` tag.
88+
89+
Because this project is aimed at progressively enhancing, this is a simple
90+
way to work without JS and then progressively enhance, adding in support
91+
for a faster load time by asynchronously loading extra styles.
92+
93+
* Why care about noscript in an architecture depending on fetch support?
94+
95+
This architecture doesn't depend on JavaScript. *If* JavaScript is supported
96+
then we rely on a fetch library to handle network requests.
97+
98+
Essentially the noscript use is a small (and trivial) attempt at treating
99+
JavaScript as a progressive enhancement.
100+
72101
## License
73102

74103
Copyright 2015 Google, Inc.

0 commit comments

Comments
 (0)