-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added preloads are not used when pagecache is enabled #38
Comments
Best option is likely to move the responseplugin to hook in on Magento\Framework\View\Result\Layout instead (with high sortorder so it goes last), this one will get cached by Pagecache |
Sorry for not having responded for quite some time. I've tested this behaviour back then, but could not find any issues. And I checked it again, but am not able to duplicate. In short, if I'm enabling FPC, reload the page so that the Could you share your details and environment specifics? |
Maybe to comment on this, the links that @Morgy93 are not added by this extension, but are added by the Magento core via |
Are you sure? Because if I disable Just the |
@jissereitsma Any insights for my previous comment? |
The preload tags and http header links are added onto the http response (presumably) after magento saves it into page cache.
With page cache enabled the first load will have all the preloads in the http header and in the but on the second load, when the page is cached in full_page cache, some of these preloads disappear.
A little bit of debugging brought me to the following piece of code.
Here it attempts to add the links from the layout by retrieving the 'link-preload' block
This is however not possible, since the layout doesn't get generated since we're loading a page that is in full_page cache. This results in the added layout items not being added.
I believe a way of solving this is by caching the links in magento somewhere (specific to a page) and then using that cache to build the preload links when a page is in full_page cache.
The text was updated successfully, but these errors were encountered: