Firefox redirects to wyciwyg://url

Asked

Viewed 107 times

0

After an Ajax call, return html as string and Gero a new page with document.write().

But when browsing this page, when using the browser back or forward, the urls of the pages begin to come with wyciwyg (Ex.: wyciwyg://4/http://localhost/), Firefox ends up directing to a wyciwyg stored page (what you cache is what you get). The problem is that it is leaving this in the url, using the protocol wyciwyg and compromising the url.

This is a bug in firefox on pages generated with document.write().

  • Delete cache and cookies https://support.mozilla.org/pt-BR/questions/939802

  • Squeeze Alt from the keyboard, go to File and see if the option is enabled Work Offline (if you are in English Arquivo or Ficheiro), checks if your Firefox is updated, because it can also be a bug, recordome that this problem occurred in Firefox 3.5, but we are already in Firefox 50.

  • @Guilhermenascimento It’s really an old bug: Bugzilla.mozilla.org/show_bug.cgi? id=387333. Only my firefox is the latest version (50.0.2). It was not in offline mode, then I put to see, I found it curious that in offline mode did not appear. I tried in version 45 tbm, but msm thing.

  • @Yagoml could provide a very simple example of how this occurs with document.write?

  • @Guilhermenascimento I simply return the html to the ajax request as a string, after which I load the page using the write(). The page loads normally, but when it generates history/cache on this page using the back/back, when re-generating this page, it comes with the wyciwyg:// url. I put the example code in the question.

1 answer

1


I could not reproduce what happened with your code, I’m using Firefox 50 too, the document.write just delete page content and rewrite, for example:

setInterval(function() {
    document.open();
    document.write("<strong>Resposta:<\/strong> " + (new Date()));
    document.close();
}, 1500);
<h1>Olá, mundo!</h1>

However, if that’s what you wish you can exchange for document.body.innerHTML that will perhaps correct:

setInterval(function() {
    document.body.innerHTML = "<strong>Resposta:<\/strong> " + (new Date());
    document.close();
}, 1500);
<h1>Olá, mundo!</h1>

  • I changed here, instead of returning the whole page, I returned only a part and used the html of jquery msm. Thus it uses the same page and does not cache wygiwyc, which stores pages written with write(). It is a firefox bug that persists. Vlw ae.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.