Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ability to use Akamai Edge-Caching header
https://techdocs.akamai.com/property-mgr/docs/know-caching
This can significantly speed up the initial render of your pages.
Please only use Edge Caching if it makes sense for your implementation. If all users see the same data on PDP/PLP/Home whether logged in or not, then they can use this implementation as-is.
If there is different pricing based on the user's store or price list, then you will need more changes to assign unique query parameters. For example, if https://example.com/c/10 had different store pricing, you would need to add a query parameter like https://example.com/c/10?storeCode=10 to make the URL unique. Edge Caching will consider URLs with different query parameters unique.
No cookies are cached by the implementation. Cookies will not be sent on the initial page load, and will be handled by the loading of _mzBlank.gif.
Monetate and Google Analytics are fully supported with this change and should need no change.
Before using, please check all custom hypr templates in your code that is using the
usermodel and ensure that cached pages are not using any customer-specific rendered data.It is also important to check the usage of
pageContext.isMobileandpageContext.isDesktopin the theme. These are not used in the core theme but possibly could be used in custom implemented code. Note that detecting whether the page is mobile or desktop by using these variables is not recommended (as they are guessed from the User Agent and could be incorrect, these variables were added in the time before reactive CSS was common). Use CSS Media queries to implement reactive CSS so the HTML/CSS is invariant under caching.If you are working on improving the performance of your theme, make sure to work though https://docs.kibocommerce.com/help/maximize-theme-performance and make the changes recommended in this article as well.
Make sure to coordinate with Kibo before using this on your production tenant.