How do i cache all images in my website to client machine and how do i cross check performance of my web site? i have search a lot and i have created handler also but i am not able to find out whether it is write or wrong. following are code chunk which i have done in my application...
i have used "SoftwareArchitects.dll" file, which i download from code project.
The things i added in Config file..
<configuration>
<configSections>
<sectionGroup name="SoftwareArchitects">
<section name="Caching" requirePermission="false" type="SoftwareArchitects.Web.Configuration.CachingSection, SoftwareArchitects.Web.CachingHandler"/>
</sectionGroup>
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<trace enabled="true" pageOutput="false" requestLimit="50" mostRecent="true"/>
<httpHandlers>
<add verb="*" path="*.gif.ashx" type="SoftwareArchitects.Web.CachingHandler, SoftwareArchitects.Web.CachingHandler"/>
<add verb="*" path="*.jpg.ashx" type="SoftwareArchitects.Web.CachingHandler, SoftwareArchitects.Web.CachingHandler"/>
<add verb="*" path="*.png.ashx" type="SoftwareArchitects.Web.CachingHandler, SoftwareArchitects.Web.CachingHandler"/>
</httpHandlers>
</system.web>
<SoftwareArchitects>
<Caching CachingTimeSpan="1">
<FileExtensions>
<clear/>
<add Extension="gif" ContentType="image\gif"/>
<add Extension="jpg" ContentType="image\jpeg"/>
<add Extension="png" ContentType="image\png"/>
</FileExtensions>
</Caching>
</SoftwareArchitects>
</configuration>
Following is my default.aspx file
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="ImageCaching._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Image Caching Sample
</h2>
<p>
<img src="Images/1.png.ashx" />
<asp:Button ID="btn" runat="server" />
</p>
</asp:Content>
Everything is working fine but i can not calculate the speed defference. i used trace.axd also but every time the trace is same....