Support » Plugin: LiteSpeed Cache » HTTP2 Server Push
HTTP2 Server Push
-
Hi,
I am using Autoptimize and it outputs 1 css and 1 js, but when i check the initiator column in chrome network tab i don’t see any of these assets being pushed. So it appears that the server push isn’t working with AO?
-
Hi @martychc23,
Can you list the css/js it outputs? If the file is not internal, it won’t be pushed.
Hi,
You can see the css/js AO outputs here https://www.celebrityhealthcritic.com/
Not sure what you mean by internal, but all the css/js is minified and merged with AO. They are all files from the theme/plugins, so they aren’t external files. They are all hosted on my server.
The minified css/js on your site is from CDN not your original site, so HTTP/2 push can’t work for them as its external links.
Right, so server push is not compatible with CDN? Is it not possible to use server push with a CDN?
May I know why your main site is not served from CDN ?
What do you mean by my main site? I have all my assets, css, js, images, served by the cdn. I’m using cdn enabler plugin to link my assets to the cdn, and i’ve added the cdn url in autoptimize to link the AO css/js files to the cdn. Am i missing something here?
You set all assets to serve by https://cdn.yourdomain.com/ while not put https://www.yourdomain.com/ to CDN directly. Is there any specific reason?
By https://www.yourdomain.com/ i assume you mean the actual page/article? So you’re saying i should link the cached page to the cdn directly rather than just the assets of a page?
Yes, I just don’t know if there is any reason that you exclude pages/posts from CDN.
I am not doing this intentionally, I just wasn’t aware this was possible. Currently the only options i have for linking assets to cdn are the cache enabler plugin and autoptimize which link static assets.
Is there something you can recommend which allows linking pages/posts directly to the cdn?
If you directly serve from CDN, you don’t have to separately set any special link with that cdn url. Simply switch your DNS to cdn (following cdn’s guideline). It should be able to serve your whole site from CDN.
The only reason I can find to use a separate cdn url for assets is the case when you store those files on a remote server. If assets and posts are on same server, there is no reason to only use cdn for one of them. Isn’t it? Please correct me if anything is wrong.
Just a suggestion. Please test thoroughly.
Thanks for your suggestion, I will look into doing this!
I think it depends on the CDN. With the free Cloudflare account, for example, it just serves the assets (js, css, images and so on), not the whole page. I believe you can serve all your content with a paid account, but some of the free options only serve a portion of the content. In my case, the actual page is delivered from my server, the rest from the CDN.
In my case, the actual page is delivered from my server, the rest from the CDN
That’s what’s happening with me. I’ve contacted my host and cdn providers to enquire about this further. Will update if i get a solution.
ok, so after looking into this serving the whole site over cdn is not as easy as one would hope.
Basically, you have to create a subdomain and then mirror your site onto that subdomain. I haven’t don’t this yet as i will have to look into the implications of doing so. You also have to make sure all links are relative and not absolute.
- The topic ‘HTTP2 Server Push’ is closed to new replies.