Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Firefox not loading scripts #297

Open
eml opened this issue Dec 13, 2014 · 1 comment
Open

Firefox not loading scripts #297

eml opened this issue Dec 13, 2014 · 1 comment

Comments

@eml
Copy link

eml commented Dec 13, 2014

Go to the 'resizeImages' sample page in the latest Firefox (34, on my Mac):

http://cdn.mobify.com/mobifyjs/examples/resizeImages-img-element/index.html

If you do a 'shift-reload' of the page, none of the external resources on the page load up.

The best I can surmise is that Firefox is trying to load up those resources before the capture starts, then it aborts the loading during the capture, then when the page is rebuilt, Firefox doesn't try to load those resources again. Does this sound reasonable to you?

We're using a variant of the capture library (for our own nefarious means) and we've seen that every once in a while when a captured page is rendered (only on Firefox), some of the external resources don't get loaded up (but others do).

@jansepar
Copy link
Contributor

If you do a 'shift-reload' of the page, none of the external resources on the page load up.

I'm a bit confused at the behaviour that you're seeing with regards to some of the external resources loading, but some not. I'll just explain what is going on in Firefox and it might make more sense :)

Basically, in Firefox, when you attempt to do a refresh of page /foo, since we used document.open, document.write(htmlString), and document.close, Firefox will no longer attempt to fetch the html from /foo. Instead, it will grab the htmlString we fed into our call to document.write to "reload" the page (which essentially just blows away the DOM and generates a new one using the htmlString).

There is quite the long thread about this on Bugzilla - check it out here:

https://bugzilla.mozilla.org/show_bug.cgi?id=556002

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants