0

I am working on implementation of CSS Sprite for asp.net mvc2 application. I followed the below article and tried to work on a sample project.

http://www.hanselman.com/blog/NuGetPackageOfTheWeek1ASPNETSpriteAndImageOptimization.aspx

I have added few images to the App_Sprites folder and then run the application. Updated the Site.master and Index.aspx view of HomeController with the following code :

Site.master:

<%: Sprite.ImportStylesheet("~/App_Sprites/") %>

Index.aspx:

<%: Sprite.Image("~/App_Sprites/community_icon_dkgreen.jpg")%>
     <%: Sprite.Image("~/App_Sprites/community_icon_lightblue.jpg")%>
     <%: Sprite.Image("~/App_Sprites/community_icon_ltgreen.jpg")%>
     <%: Sprite.Image("~/App_Sprites/elearning_icon_dkblue(979183).gif")%>
     <%: Sprite.Image("~/App_Sprites/elearning_icon_dkgreen(552670).gif")%>
     <%: Sprite.Image("~/App_Sprites/elearning_icon_mdblue(516430).gif")%>
     <div class="community_icon_dkgreen.jpg"></div>

enter image description here

enter image description here

Can anyone help me to know why there is a difference in the response and request count?

Thanks & Regards, Santosh Kumar Patro

santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143

1 Answers1

1

Good question! Here is my perception. Firefox is showing correctly all the server requests it made. Whereas Chrome also shows provisional header requests which does not make a real request to server. Base64 encoded image bytes have been already downloaded as part of highCompact.css file request. Here is an answer I can relate - Caution provisional headers are shown in chrome debugger

Community
  • 1
  • 1
sandeep talabathula
  • 3,238
  • 3
  • 29
  • 38
  • 1
    I checked the sample using Fiddler and found that the Fiddler request count matches with Firefox request count.Thanks a lot for the answer. It helped me a lot to understand the internals.:) – santosh kumar patro Jan 30 '14 at 10:07