reload page hotkey that skips re-sending information
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
reload page hotkey that skips re-sending information
I want to reload some pages while doing some dev work but if the page to reload is a submitted form, firefox will prompt me to re-send the form data if I press F5. Is there a hotkey to refresh the page without this prompt, so that firefox just goes to the same url again? I have to manually go to the url bar and hit enter to do this now.
- Grumpus
- Posts: 13239
- Joined: October 19th, 2007, 4:23 am
- Location: ... Da' Swamp
Re: reload page hotkey that skips re-sending information
Maybe these links will help, I didn't see anything which would override the form rule on the Mozilla page but maybe somewhere in the dev page.
Mozilla Hot key page
Dev Hot keys
Just wondering why you couldn't leave the form open in a tab?
Mozilla Hot key page
Dev Hot keys
Just wondering why you couldn't leave the form open in a tab?
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
Re: reload page hotkey that skips re-sending information
Thanks for the links, I will look at them.
I am a bit confused at what you are suggesting with having the form open in a tab. Maybe my situation wasn't clear. I am continuously submitting forms with new data/POST to debug them and test new features. Am I missing something?
I am a bit confused at what you are suggesting with having the form open in a tab. Maybe my situation wasn't clear. I am continuously submitting forms with new data/POST to debug them and test new features. Am I missing something?
- Grumpus
- Posts: 13239
- Joined: October 19th, 2007, 4:23 am
- Location: ... Da' Swamp
Re: reload page hotkey that skips re-sending information
@WindHeight - No I did. I thought you wanted one instance of empty form page reloaded.
You might want to clear form history after each submission and save the basic blank form page link as a bookmark for the return.
You might want to clear form history after each submission and save the basic blank form page link as a bookmark for the return.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
Re: reload page hotkey that skips re-sending information
I lowered it to two hotkeys based on the links you posted: F6 to select the location bar and then Enter. Would anyone have an idea on how to combine these two hotkeys to one hotkey?
- Grumpus
- Posts: 13239
- Joined: October 19th, 2007, 4:23 am
- Location: ... Da' Swamp
Re: reload page hotkey that skips re-sending information
Does Windows still allow macros? maybe that way.
Otherwise some css code or script.
Otherwise some css code or script.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
-
- Posts: 6405
- Joined: February 3rd, 2009, 6:29 pm
Re: reload page hotkey that skips re-sending information
You can reload the page with the keyconfig extension.
I don't know the code to reload the page without the prompt. I would have to test.
Dorando keyconfig
http://addons.mozilla.org/en-us/firefox ... keyconfig/
nsIWebNavigation
http://developer.mozilla.org/en-US/docs ... Navigation
http://dxr.mozilla.org/mozilla-release/ ... gation.idl
I don't know the code to reload the page without the prompt. I would have to test.
Code: Select all
gBrowser.loadURI(gBrowser.currentURI.spec);
Code: Select all
BrowserCharsetReload();
Code: Select all
BrowserReloadSkipCache();
Code: Select all
// same as BrowserReloadSkipCache()
var webNav = Components.interfaces.nsIWebNavigation;
var flags = webNav.LOAD_FLAGS_BYPASS_PROXY | webNav.LOAD_FLAGS_BYPASS_CACHE;
BrowserReloadWithFlags(flags);
http://addons.mozilla.org/en-us/firefox ... keyconfig/
nsIWebNavigation
http://developer.mozilla.org/en-US/docs ... Navigation
http://dxr.mozilla.org/mozilla-release/ ... gation.idl
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
Re: reload page hotkey that skips re-sending information
Morat - the last one worked perfectly, thanks! Some of the others did too but did not work with all urls, like those with # anchor links in them.morat wrote:You can reload the page with the keyconfig extension.
I don't know the code to reload the page without the prompt. I would have to test.
Code: Select all
gBrowser.loadURI(gBrowser.currentURI.spec);
Code: Select all
BrowserCharsetReload();
Code: Select all
BrowserReloadSkipCache();
Dorando keyconfigCode: Select all
// same as BrowserReloadSkipCache() var webNav = Components.interfaces.nsIWebNavigation; var flags = webNav.LOAD_FLAGS_BYPASS_PROXY | webNav.LOAD_FLAGS_BYPASS_CACHE; BrowserReloadWithFlags(flags);
http://addons.mozilla.org/en-us/firefox ... keyconfig/
nsIWebNavigation
http://developer.mozilla.org/en-US/docs ... Navigation
http://dxr.mozilla.org/mozilla-release/ ... gation.idl
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
Re: reload page hotkey that skips re-sending information
Actually, I made a mistake! The first code sample did not ask to send post again but did not work with urls with a # in them - it would just go to the anchor element on the page rather than reloading it. I thought the last one did work but it was unfortunately just bad testing on my part, as it prompted to send POST again, too. The 2nd and 3rd also prompted to send POST again.
I am not familiar with the mozilla API (thanks for the links) and javascript is not my forte, although I can hack away at it. Is there a way to have the first one work with urls with a # in them?
I am not familiar with the mozilla API (thanks for the links) and javascript is not my forte, although I can hack away at it. Is there a way to have the first one work with urls with a # in them?
-
- Posts: 6405
- Joined: February 3rd, 2009, 6:29 pm
Re: reload page hotkey that skips re-sending information
Try this:WindHeight wrote:Is there a way to have the first one work with urls with a # in them?
Code: Select all
var uri = gBrowser.currentURI;
if (uri.hasRef) {
gBrowser.loadURI(uri.specIgnoringRef);
gBrowser.addEventListener("load", function () {
gBrowser.removeEventListener("load", arguments.callee, true);
gBrowser.loadURI(uri.spec);
}, true);
} else {
gBrowser.loadURI(uri.spec);
}
Here is the "Paste & Go" command. (shown when right clicking the url bar)WindHeight wrote:I have to manually go to the url bar and hit enter to do this now.
Code: Select all
gURLBar.select();
goDoCommand("cmd_paste");
gURLBar.handleCommand();
Code: Select all
gURLBar.select();
gURLBar.handleCommand();
-
- Posts: 156
- Joined: February 8th, 2008, 3:05 am
Re: reload page hotkey that skips re-sending information
morat wrote:Try this:WindHeight wrote:Is there a way to have the first one work with urls with a # in them?
Code: Select all
var uri = gBrowser.currentURI; if (uri.hasRef) { gBrowser.loadURI(uri.specIgnoringRef); gBrowser.addEventListener("load", function () { gBrowser.removeEventListener("load", arguments.callee, true); gBrowser.loadURI(uri.spec); }, true); } else { gBrowser.loadURI(uri.spec); }
Here is the "Paste & Go" command. (shown when right clicking the url bar)WindHeight wrote:I have to manually go to the url bar and hit enter to do this now.
Try this:Code: Select all
gURLBar.select(); goDoCommand("cmd_paste"); gURLBar.handleCommand();
I think the code would simulate a "manually go to the url bar and hit enter" action.Code: Select all
gURLBar.select(); gURLBar.handleCommand();
Thanks Morat. It did indeed work this time.
-
- Posts: 6405
- Joined: February 3rd, 2009, 6:29 pm
Re: reload page hotkey that skips re-sending information
You're welcome.