Every time you make a change in an asset, such as the stylesheet or JavaScript file, you need to change your version. Why? Because browsers can cache a local copy of those files to help speed up the page loading on subsequent visits to a web page. Have you ever had the problem where you made a change, pushed it to your client’s server, and then they say they can’t see the changes? So you tell them to clear their browser’s cache and that solves the problem. That’s not a solution. Why? Because then every person who came to their website previously would have to clear their browser too. That’s not realistic, is it? Nope.
Instead, Genesis provides the means for you to change the version which then changes the asset’s URL. The browser will see the change and request a new copy.
What You Will Learn
In this lab, you will:
- learn about how Genesis and WordPress work together to provide the versioning
- see how the asset’s URL works in the browser
- see the common constant that Genesis provides for the child theme
- increment (uptick) the version and see how it changes in the browser
- see where Genesis loads the stylesheet
Additional Learning
There’s a time to code and …. yup, that sums it up.
Episodes
Total Lab Runtime: 00:15:48