This is a migrated thread and some comments may be shown as answers.

SharedWebAssets User Agent

2 Answers 16 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Karl
Top achievements
Rank 1
Karl asked on 05 May 2010, 10:46 AM
When I set my useragent string to "ClickTale bot" the combined CSS and JS files are not rendered. Why is this?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 May 2010, 11:50 AM
Hello Karl,

Here is the code of the Render method:

public void Render()
        {
            if (hasRendered)
            {
                throw new InvalidOperationException(Resources.TextResource.YouCannotCallRenderMoreThanOnce);
            }

            if (ViewContext.HttpContext.Request.Browser.SupportsCss)
            {
                Write(ViewContext.HttpContext.Response.Output);
            }

            hasRendered = true;
        }

The highlighted part shows why the CSS is not output with this user agent. If this is not the desired behavior you can modify the source code.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Karl
Top achievements
Rank 1
answered on 05 May 2010, 02:45 PM
That sorted it thanks. Also removed:
if (ViewContext.HttpContext.Request.Browser.EcmaScriptVersion.Major >= 1) 
 
from ScriptRegistrar.cs
Tags
General Discussions
Asked by
Karl
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Karl
Top achievements
Rank 1
Share this question
or