Archived topic
Cache setting
4 replies · Started by Jusung on August 15, 2022
Hello.
I have made the cache setting on the server page.
So, I didn't have to install any plug-in.
but by the default setting of the hosting server, my cache setting goes back to the original setting.
So, I think I need to make the cache setting on the site page.
I think I can add the cache setting code by using Elements?
cuz I don't wanna use plug-in.
Is there any way for this?
Hi Jusung,
Where are you adding this code at the moment? Is it in the head or footer of your website? If so, then you can use a Hook Element?
I have added it on the server page.
.htaccess (but this file is restored automatically)
maybe I can use elements for the cache setting now.
but one question is what is the difference between adding elements and adding the code in the file directly without adding elemetns?
Adding a lot of elements could cause the slow loading speed?
Also what is the different betwwen adding cache setting in the header and in the footer?
where should I add the code?
If you’re referring to something like this: https://thomasgriffin.com/how-to-leverage-browser-caching-in-wordpress-via-htaccess/ I don’t think that code would work in a Hook Element.
one question is what is the difference between adding elements and adding the code in the file directly without adding elemetns?
It depends on the code you’re adding
Adding a lot of elements could cause the slow loading speed?
It’s more or less the same as adding content to your site. The more content you have, the bulkier your site is.
Also what is the different betwwen adding cache setting in the header and in the footer?
where should I add the code?
Head it at the top of your site and style and fonts are usually loaded here. Footer is at the bottom where scripts are usually loaded.