NetTalk Central

Author Topic: How to make a page not to be cached  (Read 2072 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
How to make a page not to be cached
« 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
-----------
Regards
Alberto

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: How to make a page not to be cached
« Reply #1 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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: How to make a page not to be cached
« Reply #2 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.

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to make a page not to be cached
« Reply #3 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
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: How to make a page not to be cached
« Reply #4 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