473,378 Members | 1,564 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,378 software developers and data experts.

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

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

This is URL
http://localhost:27110/vcm-ui/request?vui.request.transport=json&vui.response.tr ansport=json&vui.request=[{%22id%22%3A0.8391487769614959%2C%22action.key%22% 3A%22message%22%2C%22event%22%3A%22multiple%22%2C% 22content%22%3A{%22com.vignette.ui.framework.modul e.id%22%3A%22task%22%2C%22com.vignette.ui.framewor k.module.view.mode%22%3A%22table%22%2C%22baseName% 22%3A%22com.vignette.ui.vcm.l10n.module.TaskResour ce%22%2C%22keys%22%3A%22accept.action.label\taccep t.action.description\treject.action.label\treject. action.description\tapprove.action.label\tapprove. action.description\tmenu.tour.label\tmenu.tour.des cription\tmenu.tour.url%22}}%2C]%20HTTP/1.1

Response
/*{xapi:{metadata:{"user": "?","status": "ok","request": "http://localhost:27110/vcm-ui/request"},container:{"type": "vui","id": "0.8391487769614959",data:[{"type": "vuiError","message": "Current user is not authorized to perform the requested action.","id": "0.8391487769614959","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.request.transport=json&vui.response.tr ansport=json&vui.request=[{%22id%22%3A0.8391487769614959%2C%22action.key%22% 3A%22message%22%2C%22event%22%3A%22multiple%22%2C% 22content%22%3A{%22com.vignette.ui.framework.modul e.id%22%3A%22task%22%2C%22com.vignette.ui.framewor k.module.view.mode%22%3A%22table%22%2C%22baseName% 22%3A%22com.vignette.ui.vcm.l10n.module.TaskResour ce%22%2C%22keys%22%3A%22accept.action.label\taccep t.action.description\treject.action.label\treject. action.description\tapprove.action.label\tapprove. action.description\tmenu.tour.label\tmenu.tour.des cription\tmenu.tour.url%22}}%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 2911
acoder
16,027 Expert Mod 8TB
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
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
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
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...
3
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...
1
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. ...
3
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,...
1
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)...
2
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"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.