# |
Dec 4th 2017, 19:47 |
inoas |
I mean... I need 35lines of js to load jquery so that other scripts can be loaded once jquery is loaded so that I can load jquery deferred... sure. |
# |
Dec 4th 2017, 19:47 |
inoas |
makes most of inlining, sprite maps, ugly js hacks unnecessary |
# |
Dec 4th 2017, 19:46 |
inoas |
http2 solved a lot of those ugly problems |
# |
Dec 4th 2017, 19:46 |
inoas |
inline css/js or Filament loadCSS |
# |
Dec 4th 2017, 19:45 |
inoas |
idea? http2 is on 80%+ devices |
# |
Dec 4th 2017, 19:45 |
inoas |
if (str_starts_with(env('SERVER_PROTOCOL'), 'HTTP/2') === true) { header(sprintf('Link: <%s>; rel=preload; as=style', $this->Url->assetUrl($criticalCssAsset)), false); ... you can probably make it a lot cleaner but that's the idea |
# |
Dec 4th 2017, 19:45 |
admad |
in an ideal world sure |
# |
Dec 4th 2017, 19:44 |
inoas |
and push/preload |
# |
Dec 4th 2017, 19:44 |
inoas |
just use http2 :) |
# |
Dec 4th 2017, 19:44 |
inoas |
no |
# |
Dec 4th 2017, 19:44 |
inoas |
haha |
# |
Dec 4th 2017, 19:44 |
admad |
show them a stupid spinner :slightly_smiling_face: |
# |
Dec 4th 2017, 19:43 |
inoas |
should I show you in a few lines how to get rid of flicker ;) |
# |
Dec 4th 2017, 19:43 |
inoas |
admad you gotta understand the tech ;) |
# |
Dec 4th 2017, 19:43 |
inoas |
but that doesnt always work |
# |
Dec 4th 2017, 19:43 |
inoas |
and we cannot do anything about it unless we cache their scripts on our servers somehow |
# |
Dec 4th 2017, 19:42 |
inoas |
some projects use so much SEM-shit... and we cannot get past say 80 page speed |
# |
Dec 4th 2017, 19:42 |
inoas |
but the tards somewhere else |
# |
Dec 4th 2017, 19:42 |
inoas |
admad well thats not the fault of pagespeed |
# |
Dec 4th 2017, 19:39 |
admad |
..and things like loading fonts and css in <head>. Fuckers you expect users to see flicker of styles being applied and fonts being switched once DOM is ready? |
# |
Dec 4th 2017, 19:37 |
obinoob |
hmic it took me a while to figure it! It work's perfect! (y) |
# |
Dec 4th 2017, 19:37 |
admad |
fucking hate pagespeed. for eg. it whines about not high enough cache time for google analytics script itself. |
# |
Dec 4th 2017, 19:30 |
inoas |
now the last 2 things pingdom complains about (pagespeed is at 100) is the query strings for asset cache busting (cause some http proxies ignore those when determining ressource identity for caching/busting) and well... cookie-less domains for assets |
# |
Dec 4th 2017, 19:29 |
inoas |
folf fomf whatever |
# |
Dec 4th 2017, 19:29 |
inoas |
including no above the fold issues with fonts but still no fouf |
# |
Dec 4th 2017, 19:29 |
inoas |
for now I am happy with the immensive benefits of http2 |
# |
Dec 4th 2017, 19:29 |
inoas |
i am setting things in close logical proximity but I will have to find a better way at some point in time |
# |
Dec 4th 2017, 19:28 |
inoas |
(and maybe we should.) |
# |
Dec 4th 2017, 19:28 |
inoas |
but then we can just remove the whole <head> block of html :) |
# |
Dec 4th 2017, 19:28 |
inoas |
well in theory I do, yes |
# |
Dec 4th 2017, 19:28 |
inoas |
I should not but I was not eager to pull out what stylesheets are required out of layout.ctp |
# |
Dec 4th 2017, 19:28 |
hmic |
you are using a middleware to to that, or at least utilize the response in the controller |
# |
Dec 4th 2017, 19:27 |
inoas |
well I am ;-) |
# |
Dec 4th 2017, 19:27 |
hmic |
:P |
# |
Dec 4th 2017, 19:27 |
hmic |
you are not using header() in your app |
# |
Dec 4th 2017, 19:26 |
inoas |
things like this header(sprintf('Link: <%s>; rel=preload; as=style', $this->Url->assetUrl($criticalCssAsset)), false) (http2) |
# |
Dec 4th 2017, 19:26 |
hmic |
inoas, you can (re)set it any time! |
# |
Dec 4th 2017, 19:26 |
inoas |
but that's global and I am using assetUrl() a lot and I think that's too late then |
# |
Dec 4th 2017, 19:26 |
admad |
inoas: other option is just set https://github.com/cakephp/app/blob/master/config/app.default.php#L50 |
# |
Dec 4th 2017, 19:25 |
inoas |
Be back later! trying |
# |
Dec 4th 2017, 19:25 |
inoas |
good. |