3

I have my own local server setup and wanted to make sure I was compatible with the big 5 browsers (IE,Firefox,Chrome,Safari,Opera), but I've run into a problem with Opera. Namely it is having trouble accessing my local resources, javascript, css, images, etc and hangs.

I can see that the GET request and the server response are good, no problems with the other browsers, but Opera hangs. At first I thought it might be the problem discussed here but I'm not sure if that is the case since Opera eventually does display the page correctly. It seems like it is waiting for something, timing out, then requesting another file until it has all it needs and then displays the page properly. It's not a problem with my Opera's config settings as I'm able to see it great accessed over my thttpd server.

the process looks something like this right now:

  • Opera sends GET HTML request to the server
  • Server responds with header & HTML file
  • Opera waits....
  • Opera sends GET resource request to the server
  • Server responds with header & resource
  • Opera waits...
  • Opera renders page

I'm still trying to find an answer to this, but it's frustrating when it works on all of the other browsers.

EDIT (11/23/11 12:15 EST):

Got message from client: 
GET / HTTP/1.1
User-Agent: Opera/9.80 (Windows NT 6.1; U; Edition United Kingdom Local; en) Presto/2.9.168 Version/11.52
Host: 192.168.0.3:8082
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Server Response:
HTTP/1.1 200 OK
Content-Type: text/html; charset=iso-8859-1
Accept-Ranges: bytes
Connection: close
Content-Length: 2909
[File content]

EDIT (11/28/11 5:30 EST): Could it be an issue with my HTML head?

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

    <meta name="viewport" content="width=device-width">

    <title>TestPage1</title>

    <!-- Javascript References -->

    <script type="text/javascript" src="Styles/Display.js" charset="utf-8"></script>    



    <!-- CCS References -->

    <link rel="stylesheet" href="Styles/Display.css" type="text/css"  charset="utf-8"/>

</head>
Community
  • 1
  • 1
Matt
  • 653
  • 1
  • 8
  • 20
  • 1
    Does the server support HTTP pipelining? Can Opera discover correctly if it supports pipelining or not? Have you tweaked the setting for max connections? For problems like this, I really need a URL to look at.. – hallvors Nov 23 '11 at 11:50
  • Its a local server (so theres no seeing it from the web) from scratch, I'm trying to make it as small as possible. I'm not familiar with pipelining, so it's not in the server. I've edited the post above with a sample of the client/server exchange if that helps. – Matt Nov 23 '11 at 17:12
  • 1
    If you disable the "Enable pipelining" pref here, does it help? opera:config#pipelining - note that you probably want to turn it back on again later, leaving it off will slow normal browsing down. Another pref you could try to tweak for analysis is opera:config#Loading%20Delayed%20Timeout - this basically decides how many seconds to wait if a JavaScript file doesn't load. – hallvors Nov 25 '11 at 10:24
  • is it `localhost` ? Opera has certain issues with file and localhost urls, especially, if they link to external web resources. – c69 Nov 28 '11 at 08:18
  • it is a 192.168.x.x localhost but there are no external web resources being called. – Matt Nov 28 '11 at 13:08
  • Are there any errors in the error console, especially network-related ones like "failed to load script ..."? – hallvors Dec 13 '11 at 22:57
  • @hallvors - turning off pipelining fixed it for me. Thanks for that! I don't use Opera for regular browsing (just for testing) so I imagine it wouldn't be a problem to leave it turned off? – Alex Ghiculescu Feb 04 '13 at 09:00
  • 2
    Well, it will load real web pages considerably slower - but unless you want to actually use Opera I guess that doesn't matter to you :-p – hallvors Feb 07 '13 at 09:54

1 Answers1

0

This question was answered in the comment by @hallvors:

If you disable the "Enable pipelining" pref here, does it help? opera:config#pipelining - note that you probably want to turn it back on again later, leaving it off will slow normal browsing down. Another pref you could try to tweak for analysis is opera:config#Loading%20Delayed%20Timeout - this basically decides how many seconds to wait if a JavaScript file doesn't load.

The bug was probably due to Opera enabling HTTP/1.1 pipelining, which Firefox and Chrome disable due to buggy server behavior and Microsoft IE did not implement. It is enabled in the Tor Browser Bundle which is based off Firefox.

Community
  • 1
  • 1
serv-inc
  • 35,772
  • 9
  • 166
  • 188