Hello.
In Kentico CMS, when using Portal engine development model, some important tags are added into head section of every rendered page automatically, as there is some important data which needs to be rendered no matter what template you are using.
Usual content of this automatically rendered code is this:
…
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<link href="/ CMSPages/GetResource.ashx?stylesheetname=<siteCodeName>" type="text/css" rel="stylesheet"/>
<link href="/ favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link href="/ favicon.ico" type="image/x-icon" rel="icon"/>
…
If you want to change it somehow, there is nothing easier than navigate to
<project folder>\CMSPages\PortalTemplate.aspx.cs file and change content of “HeaderTags” string variable.
For example, let’s say I want to remove whole “<meta http-equiv="pragma" content="no-cache" /> ” line from code above.
It can be done like this:
…
// Init the header tags
tags.Text = HeaderTags;
tags.Text = tags.Text.Replace("<meta http-equiv=\"pragma\" content=\"no-cache\" />", "");
…
When using ASPX templates instead of Portal engine pages, you can use the same approach, however you need to do it in code-behind of particular master page you are using, e.g. <project folder>/CMSTemplates/BlankAspx/Blank.master.cs.
Best Regards,
Radek Macalik