0

I would like to know how to configure a website to cache static elements of html pages?

I have heard this is automatically done by the browser/server but thinking is it a good practice to use meta tags to do the caching

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" /> 
1
  • 1
    Elements are not cached. Documents are. The examples you give suggest that you would want to prevent caching without knowing how it works. Commented Dec 10, 2013 at 9:03

1 Answer 1

1

The meta cache control tag allows Web publishers to define how pages should be handled by caches. They include directives to declare what should be cacheable, what may be stored by caches, modifications of the expiration mechanism, and revalidation and reload controls.

The allowed values are:

Public - may be cached in public shared caches

Private - may only be cached in private cache

no-Cache - may not be cached

no-Store - may be cached but not archived

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.