Question

I'm developing a website and I found that Internet Explorer tries to save the landing page instead of opening it (other browsers work fine). Here's the link:

xanderadvertising.mcas.ro

I'm trying to improve site performance by manipulating .htaccess and HTTP headers and I think there's a conflict somewhere.

Other pages are working well:

xanderadvertising.mcas.ro/en

Any ideas why IE behaves like that?

Thank you.

Was it helpful?

Solution

The page you are accessing probably has a Content-Type header telling IE it's something other than a webpage. So it tries to save it somewhere since it doesn't know how to render.

Here's the output when you use curl:

$ curl -v http://xanderadvertising.mcas.ro/

* About to connect() to xanderadvertising.mcas.ro port 80 (#0)
*   Trying 81.196.37.244... connected
* Connected to xanderadvertising.mcas.ro (81.196.37.244) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: xanderadvertising.mcas.ro
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Sat, 28 Jan 2012 11:35:26 GMT
< Server: Apache
< X-Powered-By: PHP/5.2.16
< Pragma: no-cache
< ETag: "bcb2565425a8e41ac55b3b085fd8821c"
< Cache-Control: public
< Expires: Sun, 29 Jan 2012 11:31:43 GMT
< Set-Cookie: PHPSESSID=89c110f3588929262dda820fb3d05052; expires=Sat, 11-Feb-2012 11:35:27 GMT; path=/; domain=xanderadvertising.mcas.ro
< Last-Modified: Sat, 28 Jan 2012 11:31:43 GMT
< Content-Length: 23822
< Content-Type: charset=utf-8

If you look at the final line it says: Content-Type: charset=utf-8. Try setting the content type header to something like Content-Type: text/html; charset=UTF-8.

OTHER TIPS

The page especially has no Content-Type in its response header:

Cache-Control:public
Connection:Keep-Alive
Date:Sat, 28 Jan 2012 11:32:06 GMT
ETag:"bcb2565425a8e41ac55b3b085fd8821c"
Expires:Sun, 29 Jan 2012 11:31:43 GMT
Keep-Alive:timeout=5, max=100
Server:Apache

You need to add Content-Type: text/html. It would also be good to send the Content-Length to the browser.

Maybe you can show us your .htaccess-configuration?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top