correct HTTP header for json file
I've searched around and found two different ways to define Content-type for JSON file loaded with php. header('Content-type: text/json'); header('Content-type: application/json'); which one should be used ? ...
I've searched around and found two different ways to define Content-type for JSON file loaded with php. header('Content-type: text/json'); header('Content-type: application/json'); which one should be used ? ...
A site I am working on that is built using PHP is sometimes showing a completely blank page. There are no error messages on the client or on the server. The same page may display sometimes but not others. All pages are working fine in IE7, Firefox 3, Safari and Opera. All pages are XHTML with this meta element: <meta http-equiv="Content...
When a webpage has moved to a new location, how do I show the moved web page AND return a 301 permanent redirect HTTP response status code in Django? ...
I have 4 iframes in my page whose src's change as I scroll down my web page. The faster I scroll the src's change more frequently. If I scroll fast enough I get a download prompt in FF. The downloaded file contains garbled text followed by http response headers and then more garbled text. When I capture this on ethereal I see that the ...
Do web browsers send the file size in the http header when uploading a file to the server. And if that the case, then, is it possible to refuse the file just by reading the header and not wait for the whole upload process to finish? ...
I'm automating a web application (the Mantis bug tracker) and I'm getting an interesting response header from it, called Refresh: HTTP/1.x 200 OK ... Refresh: 0;url=my_view_page.php It seems to be acting the same way that meta refresh does, and the meta refresh technique implies that it is an equivalent of a header in HTTP. Problem i...
We have a REST API which clients routinely POST and PUT data to. When they do this, sometimes they POST data which results in no change on our system. The POSTs and PUTs are well-formed, but they data they're sending is identical to the data in our database. When this happens, I've just found out that we're returning a 400 HTTP statu...
Recently an application I wrote started not working on Internet Explorer. There has been no change to the underlying (ruby on rails) code. In IE 6 or IE 7, I can make one request (HTTP Post) to the app, but when I try to make a 2nd request, I get an "Operation Aborted" message. Everything works fine in firefox. The HTTP Request and Res...
Certain malware such as AVG hijack 404 pages in order to display a page in the browser riddled with their own ads. The only work around I've found is to abandon 404 http status codes for custom error pages in my webapp. Is there any other work around? Edit: Anybody know of any other toolbars/programs that also hijack 404 pages without...
I have a web application (.war) that contains some static files (e.g. MS word documents). When I try to download these files, JBoss automatically sets some HTTP-headers in the response. Is there a way to configure JBoss (version 3.2.7) to set these headers to specific values (or omit them)? I'm especially interested in the Cache-Contr...
When working with PDFs, I've run across the MIME types 'application/pdf' and 'application/x-pdf' among others. Is there a difference between these two types, and if so what is it? Is one preferred over the other? I'm working on a web-app which must deliver huge amounts of PDFs and I want to do it the correct way, if there is one. ...
I would like to upload files from java application/applet using POST http event. I would like to avoid to use any library not included in SE, unless there is no other (feasible) option. So far I come up only with very simple solution. - Create String (Buffer) and fill it with compatible header (http://www.ietf.org/rfc/rfc1867.txt) - O...
Yesterday I've tried to get serious about rightly caching some PHP generated pages (think "Articles with comments"). Big fail. Long story short: I set the ETag header, set the Last-Modified one and check server side every Article browser request with them to see if I can send back a 304. The problem is simple: the browser (tried with F...
Hi, I need to check whether a page is being redirected or not without actually downloading the content. I just need the final URL. What's the best way of doing this is Python? Thanks! ...
The request I sent is accept gzip but the response is not compressed, instead, I received some header Via:1.1 nc1 (NetCache NetApp/6.0.5P1) I guess this is to do with my ISP since it works perfectly on my home computer. Any idea how to get the response compressed? Request header GET /test.aspx HTTP/1.1 Host this.is.example.com ...
Is it possible to do a HTTP Head request solely using an XMLHTTPRequest in JavaScript? My motivation is to conserve bandwidth. If not, is it possible to fake it? ...
Basically I want to make sure I will always get the computer's name rather than any proxy or other hardware imbetween. ...
I have some shared server web hosting in the States (I'm from the UK), which allows me to publish PHP and .NET applications. I cannot install my own software onto the remote server, but I'd like to set up a web forwarding proxy for accessing sites that serve different content depending on what country you're from. My C# and ASP.NET skil...
Hi Stackers I started some of my new web pages (xhtml 1.1) to do a regex of the request header 'Accept' and sending it the right XHTML headers if accepted XML (Firefox does, So does safari). IE (or any other browser that doesn't accept it) will just get the plain text/html headers. Will Google bot (or any other search bot) have any p...
I wish to send a header to my apache server on a linux box. Using a curl call how can I achieve this? ...