Don't allow webbrowser to cache your website - heres how
6 posts
Page 1 of 1
Don't you hate it when you make an update on your website and because web browsers cache websites/web pages users who go on your website will not see the updates?
In the <head> of your HTML file you can add this code:

In the <head> of your HTML file you can add this code:
Code: Select all
That will tell the browser to not cache your website, every time you make an update to your website/web page the user who visits the website will see it because they won't see cached web pages <meta http-equiv="pragma" content="no-cache">

My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
Great snippet, but for those who don't know, this will make page loading slower.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Yes it will but if you have a website that is updated alot and you need the pages to be loaded again and not from cache then this is how its done
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
If you want to cashe certain images, files, etc:
Replace your beginning html tag with this...
Inside the offline.manifest file you'd add the following (replace my file names with the ones you want to cashe)
Replace your beginning html tag with this...
Code: Select all
Now make sure you make a file called "offline.manifest" (without quotes) in the same directory/folder your index.html file is located.<html lang="en" manifest="offline.manifest">
Inside the offline.manifest file you'd add the following (replace my file names with the ones you want to cashe)
Code: Select all
CACHE MANIFEST
index.html
abstract.css
grayscale.css
images/mikebg.png
images/abstractbg.png
images/chrome.png
images/android.png
images/teambg.png
images/chrome-bg.png
images/cloud.png
images/firefox.png
images/safari.png
images/ie9.png
images/ipad.png
images/lin.png
images/mac.png
images/opera.png
images/win.png
images/dot-tk.gif
images/swagbucks.jpg
mikethedj4 wrote:If you want to cashe certain images, files, etc:Thanks Mike!
Replace your beginning html tag with this...Code: Select allNow make sure you make a file called "offline.manifest" (without quotes) in the same directory/folder your index.html file is located.<html lang="en" manifest="offline.manifest">
Inside the offline.manifest file you'd add the following (replace my file names with the ones you want to cashe)
Code: Select allCACHE MANIFEST index.html abstract.css grayscale.css images/mikebg.png images/abstractbg.png images/chrome.png images/android.png images/teambg.png images/chrome-bg.png images/cloud.png images/firefox.png images/safari.png images/ie9.png images/ipad.png images/lin.png images/mac.png images/opera.png images/win.png images/dot-tk.gif images/swagbucks.jpg
I was just about to ask for this part. cooll;
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023