I'm an ASP.NET developer, and I usually find myself leaving the webpage that I'm working on open in my browser (Chrome is my browser of choice, but this question is relevant for any browser). My workflow typically goes like this: I write code, I rebuild my project in Visual Studio, and then I flip back to my browser with Alt-Tab and hit F5 to refresh the page.
This is fine and dandy if a form hasn't been submitted since the page was opened. But if I've been clicking around on ASP.NET form controls, the page has posted form data a number of times, so hitting F5 causes the browser to (sensibly) pop up a confirmation message, e.g., "Confirm Form Resubmission: The page that you're looking for used information that you entered...".
Sometimes I do want to resubmit the form, but more often than not, I just want to start over with the page (rather than resubmit form data). The way I usually get around this is to simply add some query string data to the URL so that the browser sees it as a fresh page request, e.g.:
page.aspx
becomes
page.aspx?
(or vice-versa).
My question is: Is there a better way to quickly request a fresh version of a webpage (and not submit form data) in any of the major browsers? It seems like a no-brainer to me for web development, but maybe I'm missing something. What I'd love to see is something like the last item in this list:
F5: refresh page
Ctrl-F5: refresh page (and force cache refresh)
Alt-F5: request fresh copy of the page without resubmitting the form
Go to the address bar and press Enter to submit a fresh GET request. Quick keyboard shortcut is Alt+D, Enter.
Yes, just focus on address bar and press enter.
In Chrome, you can use Ctrl-L to focus on the address bar as well as the suggestions made above.
Related
I am building a chrome extension, a simple feature I want it to have is that when some clicks on the extension icon, it finds some info on the current page that my extension is visiting, and send the message from my content script to my popup, and my popup will add those info to it. now I pretty much finished all the work, there is only one problem left which is the layout of my popup does not display correctly. I have some thought about why it happens, I think it is because since the popup opens when you click on the icon, and then it finds the info on the page, and then it sends the message back to my popup, but the size of popup is already defined and displayed, so it does not rend it correctly, am I right? How should I fix it.
I think your content script should retrieve the info from the current page immediately (on load) and send this information to the background script.
The background script can store this information either in a variable, or in localStorage/Chrome storage. When opening the popup you can retrieve this information and show it immediately. This way you would avoid the racing condition.
I am using JDeveloper 11.1.2.3.0
I am having a big problem here. I create a simple page and insert a form, a createInsert button and a commit button for example. I run this page and everything is fine. I create a new record, fill the form fields and then commit. In this moment if I press F5 to reload the page, the browser asks me for confirmation "To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier." I don't understand why it has to repeat any action, I checked for dirty transactions after the commit operation and transactions are clean. If I move from this page to another and back to first it works fine, F5 refreshes without problem.
If I have a table with multiple rows and I update first row for example, and then click the third row and then perform a refresh (Confirm on above message), the third row will obtain the obtain all the information of the first row...
Does anyone know how to deal with this problem?
Ok I found the real problem and solution to this. As I said reopening the page does not bring any problem, but only hitting F5 does. My 'submit' and 'commit' buttons had 'partialSubmit=false' which should perform a total page submit in this case. Apparently this is not "detected" by the browser when pressing F5 although submission is performed. Changing 'partialSubmit=true' to the buttons did the trick. Tung
I have often experienced while developing my web applications that pressing F5 or refresh doesn't produce or refresh the proper result. But when we hit Ctrl + F5 it generates the correct result. What is the basic difference between simple F5 and Ctrl + F5?
I have often also experienced that pressing simple F5 and pressing the Refresh button in the browser also generate different results.
What is the basic difference among all these requests?
CTRL+F5 Reloads the current page, ignoring cached content and generating the expected result.
I did small research regarding this topic and found different behavior for the browsers:
See my blog post "Behind refresh button" for more details.
F5 and the refresh button will look at your browser cache before asking the server for content.
Ctrl + F5 forces a load from the server.
You can set content expiration headers and/or meta tags to ensure the browser doesn't cache anything (perhaps something you can do only for the development environment).
F5 triggers a standard reload.
Ctrl + F5 triggers a forced reload. This causes the browser to re-download the page from the web server, ensuring that it always has the latest copy.
Unlike with F5, a forced reload does not display a cached copy of the page.
F5 is a standard page reload.
and
Ctrl + F5 refreshes the page by clearing the cached content of the page.
Having the cursor in the address field and pressing Enter will also do the same as Ctrl + F5.
F5 reloads the page from server, but it uses the browser's cache for page elements like scripts, image, CSS stylesheets, etc, etc. But Ctrl + F5, reloads the page from the server and also reloads its contents from server and doesn't use local cache at all.
So by pressing F5 on, say, the Yahoo homepage, it just reloads the main HTML frame and then loads all other elements like images from its cache. If a new element was added or changed then it gets it from the server. But Ctrl + F5 reloads everything from the server.
Sometimes in websites when you click on some link a new browser windows appears where there's no back button and address bar is not editable,it's locked (greyed out) so you can't change the URL. Just a box containing some information or text boxes to enter data. I would like to know why. Is this because of some security issues or is there something else?
You are right - it has something to do with security, and in particular, preventing spoofing attempts.
The address bar is usually present in the popup windows of many browsers to indicate which page is being displayed. This way, the user is aware of their current location and will be able to tell if the popup is navigating to an illegitimate website.
The address bar is disabled as a cue to the user that they should not be navigating to a different page within the new window, but should continue their browsing experience by closing the popup and returning to the main window.
Please see this Mozilla ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=470051 - and especially Nochum Sossonko's comment for reference.
I've observed that under certain circumstances, a web browser will navigate to a blank page and then prompt the user to download a file. In my current situation, it's navigating to a URL that generates an Excel file. The download of the file works perfectly, but the user is now stranded on a blank page. There are two things I would like to figure out:
What causes the blank page to be displayed? It doesn't happen all the time. Is it the difference between using GET and POST (I can't recall seeing a hyperlink do it, but forms usually do)? Is it something to do with the Content-Disposition? In my current case, I've set the Content-Disposition to be "inline" because I want it to display in the browser in IE. Firefox (and presumably others) will of course prompt to download because they can't display it inline. It is the situation where the user chooses to save it that the blank screen results.
If it is possible, I'd like to display some content on this blank screen to provide the user with a message like "your file has been generated, click here to go back to the main screen" or somesuch. Is there a way I can do that?
I'm using an IIS extension written in C++, so solutions for ASP, PHP, etc will not be helpful unless they're generally applicable (though I wouldn't mind learning about solutions in those languages!). Thanks.
I think you practically answered your own question: setting content-disposition to inline does exactly that. One solution that comes to mind is browser detection: use inline disposition if the browser is IE, attachment otherwise.
BTW, as a user, I prefer sites which offer me a choice whether I want to download the file or view it inside the browser (when, for example, accessing a PDF file). In this case, I would consider having a link/button for downloading the file, and adding a second link/button for IE browsers to view it.