-1

I use the A.S.P DateAdd function to make the webpage cache control expires in 5 days after the current date:

<meta http-equiv="expires" content="<%=FormatDateTime(dateadd("d",5,now),1)%>">

I am afraid if a user come back every 3 days where , is he captured in an infinite loop which cause the cache is never updated (because a new 5 day is added to the current date of visit)?

If this dynamic approach is not a correct way, how should I set expires tag dynamically?

Ali Sheikhpour
  • 10,475
  • 5
  • 41
  • 82

1 Answers1

0

Using the Expires HTTP Header (or the HTML-Meta equivalent) you express the point in time, when the page expires. The browser may or may not load the page up until that date from the server.

When refreshing from the server, the client/browser will get an up-to-date version of your page (including all changes and a fresh Expires header). In conclusion: The cache will be updated.

References:

Community
  • 1
  • 1
rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38