PC Review


Reply
Thread Tools Rate Thread

Client doesn't send If-None-Match so server always returns 200

 
 
Ofer Zelig
Guest
Posts: n/a
 
      28th Jan 2007
Hello,

I have a simple AJAX-enabled (RC 1.0) web site. Runs perfectly on my local
machine (debugged by VS IDE).
The problem is that on remote ("prodction") machine, every "satellite"
file - JS, GIF etc. gets downloaded every time. I see it using HttpWatch (a
tool similar to Fiddler).
Locally, the client appropriately sends If-None-Match header so the server
returns 304 Not Modified as needed. But accessing the remote version, the
client doens't send this header, so the server always returns 200 and a full
stream.

I'd appreciate your help!

Thanks,
Ofer


 
Reply With Quote
 
 
 
 
Laurent Bugnion [MVP]
Guest
Posts: n/a
 
      28th Jan 2007
Hi,

Ofer Zelig wrote:
> Hello,
>
> I have a simple AJAX-enabled (RC 1.0) web site. Runs perfectly on my local
> machine (debugged by VS IDE).
> The problem is that on remote ("prodction") machine, every "satellite"
> file - JS, GIF etc. gets downloaded every time. I see it using HttpWatch (a
> tool similar to Fiddler).
> Locally, the client appropriately sends If-None-Match header so the server
> returns 304 Not Modified as needed. But accessing the remote version, the
> client doens't send this header, so the server always returns 200 and a full
> stream.
>
> I'd appreciate your help!
>
> Thanks,
> Ofer


Could that be as simple as a cache setting problem in the client? We had
that kind of issue at work once with our system tester, until we noticed
that their cache was set to "refresh everytime I visit the webpage".
Changing that setting to "Automatically" took care of the problem.

For IE7: Internet Options / General / Browsing history settings.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
Ofer Zelig
Guest
Posts: n/a
 
      29th Jan 2007
No, it's the default setting - Automatic.
And I use the same client to the local site and the remote one...


"Laurent Bugnion [MVP]" <galasoft-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> Ofer Zelig wrote:
> > Hello,
> >
> > I have a simple AJAX-enabled (RC 1.0) web site. Runs perfectly on my

local
> > machine (debugged by VS IDE).
> > The problem is that on remote ("prodction") machine, every "satellite"
> > file - JS, GIF etc. gets downloaded every time. I see it using HttpWatch

(a
> > tool similar to Fiddler).
> > Locally, the client appropriately sends If-None-Match header so the

server
> > returns 304 Not Modified as needed. But accessing the remote version,

the
> > client doens't send this header, so the server always returns 200 and a

full
> > stream.
> >
> > I'd appreciate your help!
> >
> > Thanks,
> > Ofer

>
> Could that be as simple as a cache setting problem in the client? We had
> that kind of issue at work once with our system tester, until we noticed
> that their cache was set to "refresh everytime I visit the webpage".
> Changing that setting to "Automatically" took care of the problem.
>
> For IE7: Internet Options / General / Browsing history settings.
>
> HTH,
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch



 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      29th Jan 2007
Hi Ofer,

Can you confirm that it's AJAX related? I mean, does a static html file
uses the GIF/JS file also has this issue?

If the client is not sending the header, it's probably a client-side issue.
Try other browsers or other systems to verify this.


Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Ofer Zelig
Guest
Posts: n/a
 
      29th Jan 2007
Hi Walter,

Regular HTML file works fine. It sends If-None-Match as needed and gets 304.
A simple ASPX page, which only contains an IMG tag also works fine.
The main and specific problem is with JS files. Local site sends
If-None-Match and remote one doesn't. This happens even in a very simple
ASPX page which doesn't include AJAX code at all, and contains only a SCRIPT
tag.
As mentioned, as use the same IE client for both local and remote requests
so I can't understand the difference in behavior. I can't perform a test on
other browser (FireFox for eaxmple) because I don't have a tool similar to
HttpWatch to work with in that browser... so the problem, in my opinion,
focuses on the different behavior of ASP.NET engine between running locally
and remotely, and I can't point out the exact problem.

Thanks,
Ofer



"Walter Wang [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Ofer,
>
> Can you confirm that it's AJAX related? I mean, does a static html file
> uses the GIF/JS file also has this issue?
>
> If the client is not sending the header, it's probably a client-side

issue.
> Try other browsers or other systems to verify this.
>
>
> Regards,
> Walter Wang ((E-Mail Removed), remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>



 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      30th Jan 2007
Hi Ofer,

Your IIS on remote server probably disabled cache. Here's my test steps to
make a javascript file not cached by client browser:

1) On the remote server, open IIS manager, select the javascript file (or
you can select a virtual directory or even the whole web site), open its
properties dialog
2) In tab "HTTP Headers", check "Enable content expiration", in the field
"Web site content should", select "Expire immediately"; select OK to close
the properties dialog
3) At client-side, clear the local cache (I'm using Fiddler, therefore I
simply selected menu "Tools/Clear WinINET Cache" to clear it) and visit the
page again, refresh several times, you will see the request header doesn't
contain the if-non-match anymore since server responded with "Pragma:
no-cache".

Please check if this is the case on your remote server and let me know the
result. Thanks.

Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send photos to mail client doesn't work Infoseeker Microsoft Outlook Discussion 0 19th Mar 2009 08:40 PM
XP fax client doesn't connect to server =?Utf-8?B?b21haGExMDA=?= Windows XP Print / Fax 7 12th Jun 2007 03:39 AM
2003 server shared fax doesn't send report to client Jordan Windows XP Print / Fax 1 26th Aug 2004 10:17 AM
Server & client clock does not match Darshan Diora Microsoft Windows 2000 Active Directory 1 4th Jan 2004 11:26 PM
rules on server do not match client Lakshman Microsoft Outlook 0 8th Jul 2003 09:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:23 PM.