guptahanu / google-ajax-apis

Automatically exported from code.google.com/p/google-ajax-apis
0 stars 1 forks source link

Ajax search api javascripts sending incorrect or no header type information #421

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Visit any site using google ajax search
2. use chrome's developer tools and turn on profiling in the resources tab
3. refresh the page
4. Look for :
Resource interpreted as image but transferred with MIME type text/html.
Which is a warning about the entire page.
Remove ajax search from your site using it to no longer see the warning.

What is the expected output? What do you see instead?
No warning. Included ajax search api javascripts are defining their header 
content mine types correctly.
The dynamically generated script with all the geo location is probably 
causing this warning. It slows down webkit rendering too.
In php, we use :
header("content-type: application/x-javascript");
to output headers in php javascript files, I suspect you are using java or 
python but that's what you need to do.

What version of the product are you using? On what operating system?
ajax search 1.0 & chromium 5.0.360.0 (0) Linux.

Please provide any additional information below.
I'm disabling ajax search on my site as a result because with out this 
warning, my site is error free.

Original issue reported on code.google.com by tonywhit...@googlemail.com on 31 Mar 2010 at 4:50

GoogleCodeExporter commented 8 years ago
I believe this is a side effect of issue 420, where the loading of the API 
results in
the attempted loading of a nonexistent image from the server. This results in a 
404
error page being returned from your server. Therefore, instead of an image as 
the
browser expected, it receives a text/html page, resulting in the error you're 
seeing.
I'm therefore marking it a dup of that issue. If this is incorrect, simply post 
back
here, and we'll un-dup it.

Original comment by jrgeer...@gmail.com on 31 Mar 2010 at 11:19