473,785 Members | 2,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does Ajax works fine in HTTP but not in HTTPS in FireFox?

When we are directly access the application from Application server(localhos t).I am getting the correct response.

This is URL
http://localhost:27110/vcm-ui/request?vui.req uest.transport= json&vui.respon se.transport=js on&vui.request =[{%22id%22%3A0.8 391487769614959 %2C%22action.ke y%22%3A%22messa ge%22%2C%22even t%22%3A%22multi ple%22%2C%22con tent%22%3A{%22c om.vignette.ui. framework.modul e.id%22%3A%22ta sk%22%2C%22com. vignette.ui.fra mework.module.v iew.mode%22%3A% 22table%22%2C%2 2baseName%22%3A %22com.vignette .ui.vcm.l10n.mo dule.TaskResour ce%22%2C%22keys %22%3A%22accept .action.label\t accept.action.d escription\trej ect.action.labe l\treject.actio n.description\t approve.action. label\tapprove. action.descript ion\tmenu.tour. label\tmenu.tou r.description\t menu.tour.url%2 2}}%2C]%20HTTP/1.1

Response
/*{xapi:{metadat a:{"user": "?","status ": "ok","reque st": "http://localhost:27110/vcm-ui/request"},conta iner:{"type": "vui","id": "0.839148776961 4959",data:[{"type": "vuiError","mes sage": "Current user is not authorized to perform the requested action.","id": "0.839148776961 4959","content" : "", "end": "---end-marker---"}]}}}*/

When we are trying to access from Webserver(https proxy) by redirecting to Application.I am getting encrypted response.

The URL for Access Webserver is

https://qa2.rpvgn.com/vcm-ui/request?vui.req uest.transport= json&vui.respon se.transport=js on&vui.request =[{%22id%22%3A0.8 391487769614959 %2C%22action.ke y%22%3A%22messa ge%22%2C%22even t%22%3A%22multi ple%22%2C%22con tent%22%3A{%22c om.vignette.ui. framework.modul e.id%22%3A%22ta sk%22%2C%22com. vignette.ui.fra mework.module.v iew.mode%22%3A% 22table%22%2C%2 2baseName%22%3A %22com.vignette .ui.vcm.l10n.mo dule.TaskResour ce%22%2C%22keys %22%3A%22accept .action.label\t accept.action.d escription\trej ect.action.labe l\treject.actio n.description\t approve.action. label\tapprove. action.descript ion\tmenu.tour. label\tmenu.tou r.description\t menu.tour.url%2 2}}%2C]%20HTTP/1.1

The Response I am getting is

������� �� ���������}��N �0D��J추6��+ �m�4Vd;]�# ʿcGp��mfwg���� �5�C��"SD�F�' Y���)�l � #?0OF�;M�ͫ�� |-�.8���ܹ:Y�Y�.x ���������^��W �C{85�˹=N�c+�� ���� Q�r#ܶ�s" BϢ� �, ��~a/8� �=�<��!� ���� %�;�����D���u� U�F�l���N�)�� R��I�e���� �

Code Used for making a Ajax request is

Expand|Select|Wrap|Line Numbers
  1.         var xhr;
  2.         if (window.XMLHttpRequest) {
  3.             xhr = new XMLHttpRequest();
  4.         }else if(window.ActiveXObject){
  5.             xhr = new ActiveXObject("Microsoft.XMLHTTP");
  6.         }
  7.         // Open the socket
  8.         // Passing null username, generates a login popup on Opera (#2865)
  9.         alert("The URL is "+s.url);
  10.         if( s.username )
  11.             xhr.open(type, s.url, s.async, s.username, s.password);
  12.         else
  13.             xhr.open(type, s.url, s.async);
  14.  
  15.         // Need an extra try/catch for cross domain requests in Firefox 3
  16.         try {
  17.             // Set the correct header, if data is being sent
  18.             if ( s.data )
  19.                 xhr.setRequestHeader("Content-Type", s.contentType);
  20.  
  21.             // Set the If-Modified-Since header, if ifModified mode.
  22.             if ( s.ifModified )
  23.                 xhr.setRequestHeader("If-Modified-Since",
  24.                     vQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
  25.  
  26.             // Set header so the called script knows that it's an XMLHttpRequest
  27.             xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  28.             xhr.setRequestHeader("Method", "GET "+s.url+" HTTP/1.1");
  29.  
  30.             // Set the Accepts header for the server, depending on the dataType
  31.             xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
  32.                 s.accepts[ s.dataType ] + ",application/json, */*" :
  33.                 s.accepts._default );
  34.         } catch(e){}
  35.  
  36.  
This working fine in IE 6 but not in FireFox and IE 7

Please help in solving it.
Oct 28 '10 #1
2 2942
acoder
16,027 Recognized Expert Moderator MVP
Perhaps you need to set the character encoding on the server-side. Check the page output without using Ajax, i.e. access the URL directly, and see the output.
Nov 1 '10 #2
sekku
1 New Member
gzip compression done by web server was not supported by IE7 and FF.
So we need to remove the compression from server level configuration, and it worked.

But by removing compression may affect the performance.
So I am looking for better solution,that browser understand gzip compression.
Nov 2 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1134
by: arti | last post by:
My Auto Suggest Text Box- (in ASP.Net using AJAX) works fine on my Local machine but not when the application runs on server. WHat happened?
2
2750
by: JDeats | last post by:
>From my development envrionment (i.e. a single WinXP notebook PC) I have a basic AJAX application that is making the call to a Windows Form page that just returns the request back to the AJAX client from the JavaScript HttpXMLRequest protected void Page_Load(object sender, EventArgs e) { string txt = ""; string input = null;
3
1396
by: alan75 | last post by:
Below is the script I used on my site, works fine on IE but not on FF. the project i working on is www.forwardpage.com, i'm adding ajax on this test page http://www.forwardpage.com/test/user.asp?id=alan. copy the link to see what i meant. nothing shows up in FF, not even an error. var xmlHttp; try{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e){ try{ // Internet Explorer
1
2328
by: simonbelmont | last post by:
Hi, The using the GET command with ajax works fine. Using POST only works if the data being retrieved is less than ~2400 bytes, otherwise it will be stuck in readyState = 3 and hang there. It's is driving me nuts. I would like to fix this rather than rewrite all the ajax code to use GET instead... Any thoughts?
3
2135
by: dmorand | last post by:
I have a page where I'm using ajax to retrieve some employee info when a user clicks a "Retrieve Employee Info" button. The issue I'm having is that when the user updates the employee info, saves the data, then hits the retrieve employee info button again the data being retrieved is the original data, not the updated data. This only occurs in any IE browser, firefox works fine. In firefox everytime I hit the retrieve employee info button,...
1
2122
by: SkyuVa | last post by:
IE8 is giving me an Unknown Runtime Error, on the following line. document.getElementById("txtHint").innerHTML=xmlhttp.responseText; Here is the complete function. function showUser(str) { //str=document.getElementById("users").value; //alert(str); if (str=="")
2
3496
by: muiz123 | last post by:
Can we use AJAX to submit a https request in a http page? E.g. 1. Open a page: http://localhost/test.html. test.html code: <html> <head> <script src="script/sys.js" language="JavaScript" type="text/javascript"></script> <script src="script/prototype.js" language="JavaScript" type="text/javascript"></script> </head>
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10327
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10151
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.