tutorial 1: how to disable cache on my website?
so basically u cant do this because browsers doing it by default but u can "bypass" this!
i created special script for this. i name it "nocatime". how script works
script just add date to end of link. example: u add nocatime to page and in url of nocatime u add "?add&url=/script.js&type=script" script creating script tag with src "/script.js?no=current-timestamp"
now there are 2 options here
add script
add this: (if u adding style file add this to head. u can add this anywhere if u adding script)
dont forget to change "url_to_file" with real link to css or script file! also dont forget to change "type_of_adding" to "style" or "script"!
to neocities users: editor may think that there is an error in this code. this is not truedont add script
add this:
<script>
var parent = "placeholder"; // put element here. for example: document.head
var adding = document.createElement("link"); // or createElement("script")
adding.href = "url_to_file" + "?nooo=" + new Date().getTime(); // if script: adding.src
adding.rel = "stylesheet"; // only if adding style
parent.appendChild(adding);
</script>