NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on August 25, 2020, 03:44:04 AM

Title: How to make a page not to be cached
Post by: Alberto on August 25, 2020, 03:44:04 AM
In a NT web server, I need a page not to be cached by the browser.
Any way to do it?
Thanks
Title: Re: How to make a page not to be cached
Post by: bshields on August 25, 2020, 04:15:54 AM
Call it with an unused parameter that holds a random value.

eg:

https://mypage.com?x=8328342747

This works if people don't see your URL, it can be a bit weird if they do).


You can also set the Cache-Control header to a max-age=0. If its your page and you want to stop caching of a page that you cannot control the URL.


Probably a bunch of other ways.
Title: Re: How to make a page not to be cached
Post by: Bruce on August 27, 2020, 11:24:44 PM
presumably it's a static page on the disk?
The parameter approach works well. (In fact a fixed parameter like ?refresh=1 works fine too.
Title: Re: How to make a page not to be cached
Post by: Alberto on August 28, 2020, 03:44:02 AM
Its a Memory form in which the user enters a number and the page shows some information about the deliver of a package.
You can test it at:
http://www.fleetsa.com.ar:99/consultar
enter the number 130130 to test
Title: Re: How to make a page not to be cached
Post by: Bruce on August 30, 2020, 10:48:33 PM
If it's a memory form, then it's not being cached by the browser. That's handled internally.

cheers
Bruce