Add html to header

brentonbattles
4 Posts
brentonbattles posted this 12 February 2024
Ask a Question

My website host suggests adding the following html to my header.

"Cache-Control" "no-cache"

However I do not know how to insert this into the header. Can you tell me how to make the header coding visible?

My website host suggests adding the following html to my header. "Cache-Control" "no-cache" However I do not know how to insert this into the header. Can you tell me how to make the header coding visible?
Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 13 February 2024

Hello Brenton,

The "Cache-Control: no-cache" directive is meant to be set in the HTTP response headers, not within the HTML document itself. The section of your HTML document is for meta tags, link tags, and other metadata related to the document, but HTTP headers need to be set on the server side.

If your hosting provider has provided you with a way to add custom HTTP headers, you should use that interface. If you are unable to do that through your hosting provider's interface, you may need to contact their support for guidance.

In the HTML document itself, you can include meta tags that provide information about caching, but these are not as effective as setting the actual HTTP header. For example, you can include the following meta tag:

<meta http-equiv="Cache-Control" content="no-cache">

in Nicepage is a specific section for "Meta Tags," you can add the following line:

<meta http-equiv="Cache-Control" content="no-cache">

But it will be better if you clarify, exactly what is the code and exactly where you need to add it. Let us know the result. Please see the screenshot.
...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Brenton, The "Cache-Control: no-cache" directive is meant to be set in the HTTP response headers, not within the HTML document itself. The <head> section of your HTML document is for meta tags, link tags, and other metadata related to the document, but HTTP headers need to be set on the server side. If your hosting provider has provided you with a way to add custom HTTP headers, you should use that interface. If you are unable to do that through your hosting provider's interface, you may need to contact their support for guidance. In the HTML document itself, you can include meta tags that provide information about caching, but these are not as effective as setting the actual HTTP header. For example, you can include the following meta tag: <meta http-equiv="Cache-Control" content="no-cache"> in Nicepage is a specific section for "Meta Tags," you can add the following line: <meta http-equiv="Cache-Control" content="no-cache"> But it will be better if you clarify, exactly what is the code and exactly where you need to add it. Let us know the result. Please see the screenshot. ................................................... Sincerely, George. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments