24

I'm trying to debug the javascript of a specific page, and I keep seeing

Reload the page to get source for page.htm in Firebug.

On Chrome, I'm mostly able to debug the js, but sometimes I also get a blank page. What can cause such issues?

I believe I always see a blank page in Chrome if I reload while the JS console is open. If I open a new Chrome tab, load the page, and then open the JS console, everything is ok.

The page I'm debugging is on a localhost server (Play Framework server), although I have seen this on other pages occasionally. This only happens with inline javascript ... js that is linked from the page is displayed fine.

ripper234
  • 222,824
  • 274
  • 634
  • 905
  • Ripper, have you found the cause of this problem? I've observed it too on FF 10.0.2 and FireBug 1.9.1. And reload never helps! – Tomas Feb 26 '12 at 16:21
  • @Tomas - this might have something to do with the server not fully closing the connection, just spitting out initial data but never properly finishing the response ... that's the only thing I can think of that may have had anything to do with this. For the record, this does't happen to me anymore. Could have been a temporary browser bug ... it was annoying as hell. – ripper234 Feb 26 '12 at 19:32

10 Answers10

17

With firebug icon, you'll see a dropdown arrow. Click that arrow to open up the drop down menu.

enter image description here

Click Clear Activation List.

Refresh the page now.

Now under script tab you'd see the Reload link. Click that to reload the page again. This time when the page reloads, you'd see the script.

Adil Malik
  • 6,279
  • 7
  • 48
  • 77
4

I have tried all the answers described here, but for me the issue was something else.

I got the same message "Reload to see all sources" in firebug, and the Chrome debugger didn't display anything in the sources tab as well. I saw that the debugger was working on other pages for my website, so the problem was the page itself and after hours of sequentially deleting everything I had in the page, all that remained was an 'img' tag.

    <img src="#" />

It seems the src attribute should not contain "#", perhaps someone with a deeper understanding of HTML could explain this, but removing it has solved the problem for me.

Hopefully this will be of use to someone else as well.

2

I had the same issue, but had simply overlooked one obvious thing.

I had the noScript Firefox extension installed and hadn't enabled scripts from all the sources on the page, and it was blocking and causing that exact message persistently.

Littm
  • 4,923
  • 4
  • 30
  • 38
Joshua Jarman
  • 427
  • 1
  • 6
  • 10
2

This might help anyone who has encountered this message too.

I had this message too and could not get what the problem was. But then I had found it: My problem was that I hade some urls in an jQuery Ajax call that were just the ones from the hosting provider, not the actual domain name. With those urls all was fine during development. Then, after launching, the site was accessed by the new domain name. The mixture of the urls was the problem.

Strange was also that the GET url that was called via Ajax has worked in the regular browser url bar. Only in JS it did not work. Seems that I still have a knowledge deficit...

robsch
  • 9,358
  • 9
  • 63
  • 104
1

I have this problem once.
the solve for me is the host name

page url: http://localhost
request url: http://192.168.0.1

supersuphot
  • 543
  • 4
  • 8
0

It may also be due to "302 Moved Temporarily" error. You can check it in firebug's Net tab.

Farshid Zaker
  • 1,960
  • 2
  • 22
  • 39
0

One other potential cause of the “Reload the page to get source for” message is the server returning an empty response. Check the response headers for Content-Length:0. If this isn't what you anticipated for the response, it is probably time to do some debugging on the server side of things. Note that empty responses do not always cause the "Reload the page to get source for" message -- however, I encountered at least one situation where this was the underlying problem.

dat
  • 1,580
  • 1
  • 21
  • 30
  • 1
    In my case I was still seeing the "Reload the page to get source for" even when the response header showed not empty Content-Length – Christian Vielma Nov 18 '14 at 21:48
0

For the record, this can also happen if the certificate is jacked for https://www.xyz.com. You need to visit that site first and add a security exception.

Alkanshel
  • 4,198
  • 1
  • 35
  • 54
0

I got this message displayed while opening a page that had a content-encoding error. The page returned gzip compressed data, but a HTTP module corrupted the gzip content.

Krisztián Balla
  • 19,223
  • 13
  • 68
  • 84
0

You have 2 possibilities:

Salaros
  • 1,444
  • 1
  • 14
  • 34