Cache Page tags in sessionStorage.
- 0.4.2
-
7.1
-
7.0
- Squarespace plan that supports JavaScript.
-
CDN Hosted
Use this option for the quickest way to install this effect (files hosted externally on the jsDelivr, a CDN)
-
Options
-
Page Specific
-
Use this option if you want to have this effect on only one Page.
-
Add code from file page tags cache options.html to Page Settings > Advanced > Page Header Code Injection for the Page. Read the code for any instructions within.
-
Add the following code to Page Settings > Advanced > Page Header Code Injection for the Page.
<!-- begin TWC Page Tags Cache --> <!-- License < https://github.com/tomsWebConsulting/twcsl/blob/main/LICENSE.txt#L1 > --> <script src="https://cdn.jsdelivr.net/gh/tomsWebConsulting/twcsl@ccf285a8a514218335f07e57373989a1cfdeba22/Page/Page%20Tags%20Cache/page%20tags%20cache.min.js" type="module"></script> <!-- end TWC Page Tags Cache -->
-
Refer to per-page code injection for details.
-
-
Site-wide
-
Use this option if you want to have this effect on all Pages.
-
v7.1
-
Add code from file page tags cache options.html to Website > Pages > Custom Code > Code Injection > FOOTER. Read the code for any instructions within.
-
Add the following code to Website > Pages > Custom Code > Code Injection > FOOTER.
<!-- begin TWC Page Tags Cache --> <!-- License < https://github.com/tomsWebConsulting/twcsl/blob/main/LICENSE.txt#L1 > --> <script src="https://cdn.jsdelivr.net/gh/tomsWebConsulting/twcsl@ccf285a8a514218335f07e57373989a1cfdeba22/Page/Page%20Tags%20Cache/page%20tags%20cache.min.js" type="module"></script> <!-- end TWC Page Tags Cache -->
-
-
v7.0
-
Add code from file page tags cache options.html to Website > Pages > Website Tools > Custom Code > Code Injection > FOOTER. Read the code for any instructions within.
-
Add the following code to Website > Pages > Website Tools > Custom Code > Code Injection > FOOTER.
<!-- begin TWC Page Tags Cache --> <!-- License < https://github.com/tomsWebConsulting/twcsl/blob/main/LICENSE.txt#L1 > --> <script src="https://cdn.jsdelivr.net/gh/tomsWebConsulting/twcsl@ccf285a8a514218335f07e57373989a1cfdeba22/Page/Page%20Tags%20Cache/page%20tags%20cache.min.js" type="module"></script> <!-- end TWC Page Tags Cache -->
-
-
Refer to Add code to code injection for details.
-
-
-
-
On-site
Use this option to install the full code of this effect (files hosted on your site).
-
Page Specific
-
Use this option if you want to have this effect on only one Page.
-
Add code from file page tags cache options.html to Page Settings > Advanced > Page Header Code Injection for the Page. Read the code for any instructions within.
-
Add code from file page tags cache.html to Page Settings > Advanced > Page Header Code Injection for the Page.
-
Refer to per-page code injection for details.
-
-
Site-wide
-
Use this option if you want to have this effect on all Pages.
-
v7.1
-
Add code from file page tags cache options.html to Website > Pages > Custom Code > Code Injection > FOOTER. Read the code for any instructions within.
-
Add code from file page tags cache.html to Website > Pages > Custom Code > Code Injection > FOOTER.
-
-
v7.0
-
Add code from file page tags cache options.html to Website > Pages > Website Tools > Custom Code > Code Injection > FOOTER. Read the code for any instructions within.
-
Add code from file page tags cache.html to Website > Pages > Website Tools > Custom Code > Code Injection > FOOTER.
-
-
Refer to Add code to code injection for details.
-
-
You can create callback functions to customize the processing of the tags or use them.
Your callback must accept an array parameter.
<script>
( ( ) => {
// initialize twc module
window.twc = window.twc || { };
// initialize twc ptc sub-module
twc.ptc = twc.ptc || { };
// initialize twc ptc callbacks sub-module
twc.ptc.callbacks = ( ( self ) => {
const callback = ( tags ) => {
console.log ( 'ptc log : ', tags );
};
self.push ( callback );
return self;
} ) ( twc.ptc.callbacks || [ ] );
} ) ( );
</script>Please consider making a donation.
-
2026-04-19
- fixed issue with tagNameToCssClassName not encoding className correctly, invalid tag characters
- changed DOMContentLoaded event to load
- bumped version to 0.4.2
-
2026-04-19
- changed DOMContentLoaded event to load
- fixed issue with tagNameToCssClassName not encoding className correctly, -- was encoded to -
- bumped version to 0.4.1
-
2026-03-13
- replaced undocumented API call with format=json and formatted data similar to the API call returns
- bumped version to 0.4.0
-
2025-11-30
- added cache disable option
- bumped version to 0.3.0
-
2025-11-27
- added queryValue to tag data
- bumped version to 0.2.0
-
2025-11-24
- initial version