This question is locked. New answers and comments are not allowed.

Jose Granja
Top achievements
Rank 1
Jose Granja
asked on 19 Apr 2010, 11:12 AM
Hi, I'm trying to use ScriptRegistrar .CacheDurationInDays(XX) and .Compress(true) but it's not working for me. Everytime I access te he page and I look into firebug net everything is downloaded each time. I thought that all the assets (css + javascript) that were inside ScriptRegistrar would be catched... Am I missing something?
I read the documentation and I already set <compilation debug="false" defaultLanguage="c#"> in my web.config
Any help would be aprecitated :)
regards,
jose
I read the documentation and I already set <compilation debug="false" defaultLanguage="c#"> in my web.config
Any help would be aprecitated :)
regards,
jose
15 Answers, 1 is accepted
0

David
Top achievements
Rank 1
answered on 19 Apr 2010, 02:57 PM
Jose,
Have you registered the WebAssetHttpHandler in your web.config?
Cheers
David
Have you registered the WebAssetHttpHandler in your web.config?
<add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" /> |
Cheers
David
0

Jose Granja
Top achievements
Rank 1
answered on 19 Apr 2010, 03:09 PM
Yes I have that in my web.config! Something must be missing... I would like to improve my web app speed but it makes no diference if I run with the cache option or not!
Is there something more that can be missing?
thanks
regards,
jose
0

IQworks
Top achievements
Rank 1
answered on 19 Apr 2010, 06:03 PM
Hi Jjose,
I am curious, Is it possible for you to post the code of the page that your scriptregistrar is on ? Also, the version of the Telerik script folder you are using?
This might help others have look at things?
thanks
I am curious, Is it possible for you to post the code of the page that your scriptregistrar is on ? Also, the version of the Telerik script folder you are using?
This might help others have look at things?
thanks
0

Jose Granja
Top achievements
Rank 1
answered on 20 Apr 2010, 10:00 AM
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> |
<%@ Register Assembly="WordInWeb" Namespace="CCWordMht" TagPrefix="cc1" %> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title> |
<asp:ContentPlaceHolder ID="TitleContent" runat="server" /> |
</title> |
<asp:ContentPlaceHolder ID="HeadContent" runat="server" /> |
</head> |
<body> |
<!-- Css render --> |
<% |
Html.Telerik().StyleSheetRegistrar().StyleSheets(stylesheet => { |
stylesheet.AddGroup("css", group => |
group.Add("reset.css") |
.Add("jquery-ui-1.7.2.custom.css") |
.Add("telerik.common.css") |
.Add("telerik.office2007.min.css") |
.Add("Site.css") |
.Add("SiteBilling.css") |
.Add("SiteLetter.css") |
.Add("styles.css") |
.Add("jquery.Jcrop.css") |
.Add("style_wizard.css") |
); |
} |
) |
.Render(); |
%> |
<% Html.RenderPartial("SiteMasterScripts"); %> |
<div class="page"> |
<div id="header"> |
<div id ="RightHeaderContent" style="float:right"> |
<div id="logindisplay"> |
<% Html.RenderPartial("LogOnUserControl"); %> |
<% Html.RenderPartial("GetAppSettings"); %> |
</div> |
<div id="menucontainer" class="ui-corner-all" > |
<ul id="menu"> |
<li><%= Html.ActionLink("Diary", "AdminDiaryGP", "Diary")%></li> |
<li><%= Html.ActionLink("Diary Available Period", "CreateEditAvailablePeriods", "AvailablePeriod")%></li> |
<li><%= Html.ActionLink("App Setttings", "Index", "Settings")%></li> |
</ul> |
</div> |
</div> |
<div id="LeftHeaderContent"> |
<div id="title"> |
<h1>xx</h1> |
</div> |
<div id="PatientGlobalSearch" class="ui-corner-all"> |
<span style="vertical-align:middle"> Patient Search: </span> <%= Html.TextBox("PatientSearch" , " " , new { @class = "ButtonSearch" } )%> <button class="fg-button ui-state-default ui-corner-all" type=button" onclick="AdvancedSearch();" ><span class="ui-icon ui-icon-search fg-icon-left" ></span>Advanced Search</button> <button class="fg-button ui-state-default ui-corner-all" type=button" onclick="GoTo('<%= Url.Action("Details", "Patient" , new { ID = " " },null)%>');" ><span class="ui-icon ui-icon-plusthick fg-icon-left" ></span>New Patient</button> |
</div> |
</div> |
<div id="breadcrumb"> |
<%=Html.SiteMapPath()%> |
</div> |
<div id="errorInfoDivs"> |
<div id="errorRequest" class="ErrorDiv ui-corner-all"> |
<span class="SpanRight"><a href="javascript:HideErrorRequest()"><span class="ui-icon ui-icon-closethick"/></a></span><span id="errorRequestMessage"></span> |
</div> |
<div id="errorAjaxRequest" class="ErrorDiv ui-corner-all"> |
<strong>operation cancelled: </strong><span id="errorMessageAjax"></span> |
</div> |
<div id="error" class="ErrorDiv ui-corner-all"> |
<span class="SpanRight"><a href="javascript:HideErrors()"><span class="ui-icon ui-icon-closethick"/></a></span><span><strong>Error: </strong><span id="errorMessage"></span></span> |
</div> |
<div id="info" class="InfoDiv ui-corner-all"> |
<span class="SpanRight"><a href="javascript:HideInfo()"><span class="ui-icon ui-icon-closethick"/></a></span><span><span id="infoMessage"></span></span> |
</div> |
<div id="infoRequest" class="InfoDiv ui-corner-all"> |
<span class="SpanRight"><a href="javascript:HideInfoRequest()"><span class="ui-icon ui-icon-closethick"/></a></span><span><span id="infoRequestMessage"></span></span> |
</div> |
</div> |
<div id="main" class="ui-corner-all"> |
<div id="Download" /> |
<asp:ContentPlaceHolder ID="MainContent" runat="server"/> |
<asp:ContentPlaceHolder ID="MainContent2" runat="server"/> |
<div id="footer"> |
</div> |
</div> |
<script type="text/javascript"> |
//this works for the whole system |
//catching of Errors and Info messages sended by the request |
if (typeof(Sys) != 'undefined') |
{ |
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); |
} |
</script> |
<!-- JQuery --> |
<% |
//Plugins: Autocomplete, Form, Tootlip, UI |
Html.Telerik().ScriptRegistrar().Globalization(true).DefaultGroup( |
group => |
group.Add("jquery.qtip-1.0.0-rc3.min.js") |
.Add("jquery-ui-1.7.2.custom.min.js") |
.Add("jquery.form.js") |
.Add("jquery.autocomplete-min.js") |
.Add("jquery.confirm-1.2.js") |
.Add("ajaxupload.js") |
.Add("jquery.Jcrop.js") |
.Add("SmartWizard.js") |
.CacheDurationInDays(65) |
.Compress(true) |
).OnDocumentReady(() => |
{%> |
documentReady(); |
ToolTipsEnable(); |
ButtonEnable(); |
PatientSearchEnable(); |
setInterval(KeepSessionAlive, 60000); |
<%} |
) |
.Render(); |
%> |
</div> |
</body> |
</html> |
does this help?
thanks
0
Hi Jose Granja,
As documented caching works only for combined asset groups. Your asset group is not combined.
All the best,
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.
As documented caching works only for combined asset groups. Your asset group is not combined.
All the best,
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

Jose Granja
Top achievements
Rank 1
answered on 20 Apr 2010, 10:13 AM
Hi,
ups that's my mistake, I didn't read it was a must having the .Combined(true). The problem is that I turn on the combined option and I start getting a lot of javascript errors such as:
- jQuery("#Patient").tTabStrip is not a function
and more.
everything works and when I combine the assets I doesn't. Any ideas???
I feel we are now close the problem and I can't wait to solve it :)
regards
0
Hi Jose Granja,
I am not sure why this problem may occur. I suggest you send us a sample project which demonstrates the JavaScript errors.
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.
I am not sure why this problem may occur. I suggest you send us a sample project which demonstrates the JavaScript errors.
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

Jose Granja
Top achievements
Rank 1
answered on 20 Oct 2010, 11:33 AM
Hi, I keep having the problem!
Now I'm using the latest version of MVC and the error appears even in the line:
Now I'm using the latest version of MVC and the error appears even in the line:
this.each is not a function
return this.each(function() {
In another pluguin! I can't understand why pluguins won't work as expected when combined!
I have as well another issue:
everything would work fine but when I set the debug="false" a pluguin won't work properly! I've checked the net for the files and it seems that all are download ok!
You know if there's an impact on ScriptRegistar when you set Debug="false" ? What can be causing the problem? I'm clueless.
It's not surprising that the pluguin that doesn't work properly and that combine properly is the same: http://craigsworks.com/projects/qtip/download/
I downloaded their latest build but I don't know if it's their trouble our telerik's. Could you give me some help?
thanks,
regards
In another pluguin! I can't understand why pluguins won't work as expected when combined!
I have as well another issue:
everything would work fine but when I set the debug="false" a pluguin won't work properly! I've checked the net for the files and it seems that all are download ok!
You know if there's an impact on ScriptRegistar when you set Debug="false" ? What can be causing the problem? I'm clueless.
It's not surprising that the pluguin that doesn't work properly and that combine properly is the same: http://craigsworks.com/projects/qtip/download/
I downloaded their latest build but I don't know if it's their trouble our telerik's. Could you give me some help?
thanks,
regards
0
Hello Jose Granja,
Atanas Korchev
the Telerik team
I can't help unless you provide some means to reproduce the problem you are facing.
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

Jose Granja
Top achievements
Rank 1
answered on 20 Oct 2010, 03:24 PM
Here I send you a sample! I can't reproduce the whole lot but yes the combine and compress.
Hope that helps
Hope that helps
0
Hello Jose Granja,
Atanas Korchev
the Telerik team
Adding a ';' at the end of jquery.qtip-1.0.min.js seems to resolve the problem. After combination the JavaScript file became invalid due the lack of this semicolon.
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

Robbie Hughes
Top achievements
Rank 1
answered on 20 Oct 2010, 04:17 PM
Yes that did the trick!!! :)
There's something wrong about this pluguin... do you have any idea why it work in a diferent way if I send debug=="false" ? I was not able to reproduce the error on the test I send you :S Can the behaviour of javascript change between debug=="true" and "false" ? I which way? I'm clueless
anyway thank you very much for your help :)
regards,
jose
There's something wrong about this pluguin... do you have any idea why it work in a diferent way if I send debug=="false" ? I was not able to reproduce the error on the test I send you :S Can the behaviour of javascript change between debug=="true" and "false" ? I which way? I'm clueless
anyway thank you very much for your help :)
regards,
jose
0
Hello Robbie Hughes,
Atanas Korchev
the Telerik team
What exactly changes? How can I reproduce this in the test project?
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

Robbie Hughes
Top achievements
Rank 1
answered on 20 Oct 2010, 04:51 PM
Mmmm weird thing happened here! I had some previous version of the qtip in my Scripts folder (but I only called one in the ScriptRegistar). Somehow I guess it was picking another one when I set the flag debug to false. I just removed the files and it works as expected :)
Do you know if I have to put any extra configuration in the server? Combining Css doesn't work in my server. It works locally but not on the production server. I'm using IIS6 local and IIS7 in the server.
cheers,
jose
Do you know if I have to put any extra configuration in the server? Combining Css doesn't work in my server. It works locally but not on the production server. I'm using IIS6 local and IIS7 in the server.
cheers,
jose
0
Hi Robbie Hughes,
Atanas Korchev
the Telerik team
If you are using the same web.config as the test application then you need to register the asset.axd HTTP handler for IIS7 as well. This help topic explains how.
All the best,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