Not a member yet?

Not a member yet? Register now!

*
*
*

*
Already a member?
ASPX templates
Version 3.x > ASPX templates > how to remove <meta http-equiv="pragma" content="no-cache" /> ? View modes: 
User avatar
Member
Member
edo-conduit - 9/14/2008 10:15:56 AM
     
how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hey All,
Is there a way to remove the <meta http-equiv="pragma" content="no-cache" /> tag on the top of all my pages ?

Thanks !
Edo

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 9/15/2008 7:05:11 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hi Edo,

The order of rendered 'HEAD' items is specified in the '~\App_Code\CMSPages\DocumentBase.cs' files in the 'GetHeaderTags()' method. You can simply comment your desired tag which will be reflected on live site.

You could also manage other meta tags here.
Please note that reordering the conditions should results in reordering the rendered text.

Best regards

User avatar
Member
Member
bartek.suchan-u2i - 9/7/2009 2:26:04 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hi,

I have the same problem but in my project there is no DocumentBase.cs file in that location. We are using kentico v4.0 . What should I do to remove no-cache meta tag?

Best regards

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 9/9/2009 9:42:54 PM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hi,

The DocumentBase.cs file has been moved to the DLL libraries (Source code) since version 4.0. If you are using Portal Engine development method, you can open
~\CMSPages\PortalTemplate.aspx.cs and find the following line:

this.ltlTags.Text = this.HeaderTags;

You can parse it and remove the tag that you don't want to be rendered in the output HTML.

Hope this helps.

User avatar
Member
Member
surobartatelecom-rdiffmail - 10/6/2009 1:25:10 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
kentico_zdenekc wrote: Hi,

The DocumentBase.cs file has been moved to the DLL libraries (Source code) since version 4.0. If you are using Portal Engine development method, you can open
~\CMSPages\PortalTemplate.aspx.cs and find the following line:

this.ltlTags.Text = this.HeaderTags;

You can parse it and remove the tag that you don't want to be rendered in the output HTML.

Hope this helps.


User avatar
Member
Member
davidgoss - 3/29/2010 11:36:21 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
I will find this useful as well, however you said to comment out the tag. It would be cleaner to delete it, but would this cause some sort of error?

User avatar
Member
Member
surobartatelecom-rdiffmail - 10/6/2009 1:30:08 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
pls remove meta http-

User avatar
Member
Member
surobartatelecom-rdiffmail - 10/6/2009 1:32:52 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
remove metahttp

User avatar
Member
Member
dhanrajm-bitwiseglobal - 7/13/2011 5:45:00 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hi

Some one help me in removing the
<meta name="generator" content="Kentico CMS 5.5R2 (build 5.5.3996) FREE LICENSE" /> tag from portal based website

Dhanraj

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 7/15/2011 10:08:44 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hello,

It is actually a small limitation of the Free license. However, it's still possible (and it won't break any current free license policy) to remove it by parsing the ltlTags literal in the OnPreRender or Render method as described my colleague Zdenek.

As for parsing itself, please take a look at the following example: How to change HEAD tags (it applies also to 5.x versions).

Best regards
Ondrej Vasil

User avatar
Member
Member
MUBASHIR ALI - 7/20/2011 5:02:03 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hello

I'm Using v5.5.3996 R2 (Free) as your instruction i followed your instruction but it can't removed by editing this code

this.ltlTags.Text = this.HeaderTags.Replace("<meta http-equiv=\"pragma\" content=\"no-cache\" />", "");


Could you Please Help me How i remove it ?

Thanks

HitRose.Com

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 7/27/2011 7:16:00 AM
     
RE:how to remove <meta http-equiv="pragma" content="no-cache" /> ?
Hi,

have you managed to get it working?
This should work fine, have you tried to debug it, if the method with your code is reached?
Where exactly have you put that code?

Regards,
Zdenek

1