473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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
Jan 28 '07 #1
5 2115
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
Jan 28 '07 #2
No, it's the default setting - Automatic.
And I use the same client to the local site and the remote one...
"Laurent Bugnion [MVP]" <ga*********@bluewin.chwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
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

Jan 29 '07 #3
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 (wa****@online.microsoft.com, 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.

Jan 29 '07 #4
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]" <wa****@online.microsoft.comwrote in message
news:VC*************@TK2MSFTNGHUB02.phx.gbl...
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 (wa****@online.microsoft.com, 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.
>

Jan 29 '07 #5
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 (wa****@online.microsoft.com, 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.

Jan 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jonas | last post by:
Hi, I'm writing a small chat client to learn some python and networking. No problem with the network stuff tho, the problem is when the user should be able to interact and type messages to send....
4
by: runningdog | last post by:
Hi Can someone point me to some documentation on how to create and send email from a win forms app using the defalt mail client TIA Steve
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
3
by: Gama Franco | last post by:
Hi, I'm working on a project based in Windows Forms, and I need to open the user's default e-mail client (a new e-mail) with some attachments ready to send. Since the destination of the e-mail...
4
by: Matt Frame | last post by:
I am working on a special ASP.Net application that receives files from customers. The connection is made via HTTPS and the client sends the file as a POST to my ASP.Net listener. All of this...
2
by: Rick Strahl [MVP] | last post by:
Run into an interesting problem today with a client of mine: They have an ASP.Net form that they want to drive through a client side HTTP interface. I know a Web Service would be a better way to...
2
by: Robbie De Sutter | last post by:
Hello, How do I open a new, empty e-mail message from the default e-mail client whereby the sender is given and a file is attached? Currently I use the command (vb.net): ---...
7
by: Darin | last post by:
Currently, our software is creating an email message using the Outlook DLL to send emails out that have PDF attachments. I want to stop forcing the customer to use outlook to send email. So, I...
4
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind....
1
by: tsic | last post by:
Bonjour, je suis bloqué ilya preque 2 semaines dans le code suivant. je veut que le client et le serveur envoyent leurs message d'une maniere comme msn. je crois qu'ilya quelque chose à ajouter dans...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.