AJAX :: Enable Caching On The Script Resource Handler?
Dec 9, 2010
i try optimize my web site, i read if i enable caching on the script resource handler my site improve perfonmance
<system.web.extensions> <scripting> <scriptResourceHandler enableCompression="true" enableCaching="true"/> </scripting> </system.web.extensions>
View 1 Replies
Similar Messages:
Jan 10, 2013
On PageSpeed Insights they recommend highly doing two things:
1) Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
2) Enable compression
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
We are with Network solutions and believe they are using IIS 6 with regular asp.net code. Some of the images are using Amazon S3/Cloudfront.
How do we implement the above items? I see a lot for IIS 7.
View 1 Replies
Jun 8, 2010
I'm using output caching in my custom HTTP handler in the following way:
public void ProcessRequest(HttpContext context)
{
TimeSpan freshness = new TimeSpan(0, 0, 0, 60);
context.Response.Cache.SetExpires(DateTime.Now.Add(freshness));
context.Response.Cache.SetMaxAge(freshness);
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetValidUntilExpires(true);
...
}
It works, but the problem is that refreshing the page with F5 leads to page regeneration (instead of cache usage) despite of the last codeline:
context.Response.Cache.SetValidUntilExpires(true);
UPD: Seems like the cause of problem is that HTTP handler response isn't caching on server. The following code works well for web-form, but not for handler:
Response.Cache.SetCacheability(HttpCacheability.Server);
Are there some specifics of the caching the http handler response on server?
View 2 Replies
Jan 14, 2011
I've a Gridview control using an ODS(ObjectDataSource) to fetch data. For the best performance and efficiency, I've turned-off the view state of Gridview (i.e. EnableViewstate = "false".And I've also enabled caching in the associated Objectdatasource. This eliminates as much as 50-60% performance optimization because it eliminates the DB round-trip .. courtesy ODS Caching.So, after this I got stuck into the famous "ODS sorting" issue but I managed to invent a tricky solution for it and its working fine
View 4 Replies
Apr 22, 2010
I am trying to use output caching on my .net pages but it is not working when I use Route handlers to redirect request to actual page, but it works when I call the page directly.
also one more weird thing is that when I am debugging and using .net instance of IIS http://localhost:64293/test it is working, but when I deploy it and try to call the page it is not caching i.e. http://www.mydomain/test(but it works if I call the page directly)
I am using VS 2010, IIS 6.0, .net Framework 4
aspx page code is :
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.master" Title="Not Found" %>
<%@ OutputCache Duration="300" VaryByParam="*" Location ="Server" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
litPageTitle.Text = "<br/>Datetime: " + DateTime.UtcNow.ToString();
}
</script>
my global.asax.cs code is
public static void RegisterRoutes(RouteCollection routes)
View 2 Replies
Oct 18, 2010
i have a custom handler which captures user's book mark entry. To debug this handler, i have created a file "test1.txt" in code behind which saves the user entry. After the debug, i removed the text file (test1.txt) then re-complied the web app and deployed new DLLs for the site. But, the site is still looking for test1.txt file. i dont know how to confirm if the handler is really removed from the new DLL. Also, looked at the handler code behind file and didn't find any entry with test1.txt. So,
View 1 Replies
Jul 12, 2010
I have a admin page in asp.net that adds data to a database. This database is available as a JSON string to external websites, however, since it's a lot of data, the external websites cache this data locally.I want to be able to ping the external websites to let them know the data has changed so they can referesh their cache. I figure I can setup an ASHX handler that receives a parameter telling them what data has changed, so they can both delete that data and refresh it.The only part I'm not sure about is the best way to call this external page from my admin page. Do I just do a regular WebRequest and discard the result? or is there a simpler way to call a page from code when you don't need the response?
View 2 Replies
Feb 28, 2010
I have the following code snippet :
[Code]....
With code behind :[Code]....
Why do I have to press the "Enable" button twice to enable a disabled ComboBox ?
View 1 Replies
Feb 13, 2011
I am a bit confused about these two sequence of events or processes happening in conjunction to each other. Does the page handler executes first or does the somepage.aspx get execute first or do they happen simultaneously?
View 2 Replies
Jun 14, 2010
I have a page with a number of user controls, In one of my user controls I have a button event. I turn on output cache for the user control that has the button and vary by control using the ID property of a hidden field control in the user control. whenever I turn on the output cache my button event doesn't fire.
View 2 Replies
Jan 12, 2010
How can I use an image or icon resource from global resource file in an asp:Image control to set the ImageUrl attribute?
View 1 Replies
Jun 2, 2010
I will be setting the current thread's culture at the beginning of the request lifecycle.
Does it make sense if I create my own resource.xml to store things like strings/labels/messages that will be used in the web application?
or are their drawbacks and its better if I just use the Global resources .resx files that are 'built-in' ?
View 2 Replies
Apr 7, 2010
In our web application we need to keep various company's settings. For eg "DiamondProdRefIDCaption","Shippingpickup","ZipCodeCaption","DefaultCountry","AllowToEditInvoice", etcThese settings are different for various companies and are placed in web.config as key-value pair.Initially, we have tried do simplify this process by adding a company_settings table in the DB so as to allow us to add companies on the fly. However, this method makes it very difficult to add a new setting
<%$Resources:DiamondProdRefIDCaption%>
View 3 Replies
May 15, 2010
how to implement caching in wcf service using System.Web.Caching
View 2 Replies
Mar 2, 2011
[Code]....
why i cant use the javascript function in this resource ,if i can download the axd file it create?
View 1 Replies
Mar 26, 2010
Assembly 'LocalizationRes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' contains a Web resource with name 'LocalizationRes.VerifyDeletion.js', but does not contain an embedded resource with name 'LocalizationRes.VerifyDeletion.js'. getting an error saying like this while I am trying to acces the Resource file through Ajax...
View 2 Replies
Mar 11, 2011
I've spent a while trying to figure this one out, . I am trying to implement a simple jax.actionlink(first time using) on rows in a table to remove the record from the user control. The ActionLink httpMethod is set to POST but it is not even hitting the Post action I have in the controller. It just gives me a 404 Resource not found error everytime.
I checked fiddler and the reason why I think is because its doing a GET instead of the value i set of POST. I dont have a get method for this since its just an ajax call to delete a record and return a partial view back to the div. I put a breakpoint in the POST method and definitely is not hitting that method. I'm not sure if its something simple or a configuration/routing issue or IIS issue. I've tried in chrome and IE8 just in case.
[Code]....
View 3 Replies
Dec 8, 2010
I used following to cache my ASP.NET page.
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
The problem is when I send AJAX (XmlHttpRequest) request from other page to this page, that response does not get cached on any browser but IE. (On IE, it gets cached even if I don't specify). How do I make it cache?
View 3 Replies
Jan 24, 2011
I create custom HTTP handler for auto generating file and I want to tell IIS7 to serve current request like normal static file because I need to use IIS and web.config file to control compression setting and any other HTTP header of current requested file.I know. there is an internal class called StaticFileHandler in ASP.net. But I cannot access it. Or you have any other way to work like this.
View 1 Replies
Mar 2, 2010
Whenever I use ASP.NET AJAX it's calling Resource.asx files many times and it's affecting site performance. How can we avoid that?
View 3 Replies
Jan 9, 2010
I have a tab container and three panels
<cc1:TabContainer
ID="TabContainer1"
runat="server"[code]....
In my first panel I have a asp:checklistbox, which is dynamically loaded with items ....
Eg: [Code]....
One checkbox item = "Address"
Second checkbox item = "Work Info"
When User selects and clicks on first Checkbox option Address...the second Tab is enabled
When the User Clicks on Sec Checkbox option Work Info then the third Tab is enabled .else the tabs are disabled
I was working to use JQuery and unable to achieve this
My Jquery Part of the code is like above...looks a little too complicated
View 1 Replies
Feb 27, 2011
I want to use ajax toolkit for MVC2 project.
View 2 Replies
Oct 13, 2010
I add a tools of AJAX toolkit version for VS 2008.But it's not added to my toolbox.So I click the "Reset Toolbox".
After i clicked , the entire tools are gone.I reinstall the entire visual studio,Still its not come.
how to enable the toolbox (aspx controls)?..
View 9 Replies
Jan 31, 2010
i am using asp.net ajax tab container[ which has 2 tab panel] under each tab panel i have an div tag. now by default.i have my Activetabindex="0"
now i need to enable css property for the div tag using javscript so that there is no post back happening. i doing like this css property for the tab panel 1 is not getting applied this is my script what i doing. if i do the same thing in code behind for the ta selected index change it works. but thatcause an post back. now i need t o do it my javscript only
[Code]....
so how to i enable my css property for the div using javascript for the tab panel
View 1 Replies
Jan 31, 2010
how to enable an css property for the ajax tab panel using javscript
View 1 Replies