You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to speed up the initial page load/render time for the "login" and "/map" page. I want to take advantage of the new HTTP/2 Server Push feature vor Nginx (>= 1.13.9).
First of: If your installation does not fit the requirements, you will not see any different. If your Installation fits the requirements, users get a significant boot for the initial page load time.
Requirements:
HTTPS/2 active
http2_push_preload on; set in your Nginx server config
How it works:
Clients visiting your login page (initial page request) get pushed all static resources (CSS, JS, images,....) direct to the client without any additional HTTP request. Check the blogpost linked above.
The text was updated successfully, but these errors were encountered:
Important: I forget to comment the issue with the current state. After implementation I got some questions about the usefulness of the ServerPush which led me to the decision to disable the ServerPush for v1.4.1.
Why?
Each user that visits the side, gets all resources pushed to, which are required to render the page and would be requested by the browser anyway -> Thats fine!
What about returning users? They would also receive Pushes for (CSS, JS,...) even if the browser has already cached them. So we would send additional 2MB of data to each returning client.... Think about mobile users with 3G connection -> Thats bad!
The only way to detect existing resources in browser cache would be a Cookie which is automatically send to the server (as described in the Nginx Blog). This requires more logic to be implemented.... What if browser cache was deleted and cookie information not? What should happen after a new release, cookie has to store the current version of the cached resources,...
So I want some answers to that questions before actually "enabling" ServerPush.
The good news:
The code written for ServerPush is still used and ServerPush can be tested by adding just one code line.
I wrote a Resource() PHP Class, that handles all resources for an endpoint . Resources can be registered to it and before the response it send to the client that Resource() class decides how to send the registered resources... There are two options
Registered resources can be rendered as HTML preload tags <link rel="preload" .....> -> This is how it is used for now. Still faster than conventional loading but not as fast as ServerPush
Registered resources can be send as ServerPush HTTP Headers, and Nginx sends the resources to the client
I want to speed up the initial page load/render time for the "login" and "/map" page. I want to take advantage of the new HTTP/2 Server Push feature vor Nginx (>=
1.13.9
).First of: If your installation does not fit the requirements, you will not see any different. If your Installation fits the requirements, users get a significant boot for the initial page load time.
Requirements:
http2_push_preload on;
set in your Nginx server configHow it works:
The text was updated successfully, but these errors were encountered: