Web Development - Is there a way to force a page refresh? - web-testing

As you develop a website, you will be making lots of changes to your pages. This can create a problem if your browser decides to cache the page and use an old one. Often times you want the newest one.
You can delete your whole cache by going to settings->content->clear browsing data and selecting "Cache" in the list, etc.
The problem is that this takes a ling time, especially if you only need one page changed. What is more, you don't really want to clear all the cache, just the one page. Is there a quick and easy way to only clear the cache of the problem page?

Yes, there is!
Per Kinsta:
Before you go straight to clearing your entire browser cache, one trick you can try is something called a “force refresh”.
and later:
Windows and Linux browsers: CTRL + F5
Apple Safari: SHIFT + Reload toolbar button
Chrome and Firefox for Mac: CMD + SHIFT + R
Again, this method only bypasses the cache for the specific page that you’re on. It leaves the rest of your browser cache untouched.

Related

How can I close an UI5 App without close the tab

I want to close an UI5 app by pushing the navigation button.
Is this possible ?
Btw: How can I close the app by not closing the tab?
Thanks
Because the app is in fact a "simple" web page, the concept of closing it is somewhat loose. Some ideas that you could try, depending on what you want to achieve:
Try and close the tab, but this will generally not work, because you can only close tabs that you created yourself (see Close Current Tab).
Open the blank page by using window.open("about:blank", "_self");
Open the home page of the browser by using window.home(); (see Sending user to their browser's Home Page using Javascript)
Trigger a "Back" navigation outside of your app (such that the page that was open before your app will be shown). You can use window.go(steps) to go forward / backward in the browser history by a number of steps (negative indicates that you are going backwards). It might be tricky to get the correct number of steps that you have to go back if you have hash-based routing in your app (you could use sap.ui.core.routing.History or a similar mechanism).

Mouseup event is not propagated to a popup window in IE 11

I've a legacy app that features a DND from a popup window to the main one.
It works fine in IE 8 but not in any of the newer versions of IE. The effect results in the drag ghost image being stuck in the source window and not going away after the drop had occurred.
Some debugging did in fact confirm that the 'mouseup' event does not get propagated back to the source window. What can be done to fix it? Many thanks!
ITs a bit hard to begin to answer your question without some code....
use the File>Properties menu to find out which IE security zones the two windows(domains) map too...IE uses a different security model to other browsers... drag/drop is probably not allowed between local web files (using file: protocol) and internet or intranet sites.
Have you used the Dev tool yet to debug it? If you are using showModalDialog (which normally disables context menus) you can right click on a link (a) or input element to display the context menu so you can display the debugger for showModal content page.
If possible include a link to your website or a mashup (jsfiddle) with your questions.

How to make form data persist on "reload from cache"

I'm making a website. It's a simple profile page. I don't have any subpage, I just do 3 divs and change them and css.
But because its a radioset, if you refresh the page from cache (f5) or duplicate the tab, or press back/forward, the form data remains intact so it shows the proper div. This is good behavior. However I only see this in Firefox.
Browsers like google chrome are not keeping the form data on (f5) refresh from cache but it clears form data (as if it is a reload from server). How can I make form data persist on reload from cache in this browser?
here is the site if you would like to see what i mean: http://noitidart.github.io/
I understand people sometimes want the opposite behavior then I'm looking for. They want form cleared even on reload (as Chrome currently does) but that's easy to ensure in Firefox just stick in a document.form.reset() in the head.
Firefoxes restore of form data values is fine on reload (without Shift or CTRl;).
This is missing in Google Chrome.
I found this:
autocomplete="off"
https://github.com/pradosoft/prado/issues/642
Perhaps autocomplete="on" would make it happen? :) i dont know.
stackoverflow.com uses it too.

Prevent firebug from manipulating DOM

Is there a way to prevent programs like Firebug from manipulating the DOM of a page.
I've noticed that you can simply delete thing like ads that are paid for by other companies.
Is there a way for the page to stop it?
Can you prevent me from switching to another channel on TV, or from cutting away ads from my newspaper? No. Same thing with my PC.
In other words: the page is in the client's computer, and the client can do whatever they wish with it.
The simple answer is no.
The long answer: if you construct your ads from many unrelated absolute-positioned elements, it will be next to impossible to delete them.
The right answer: if your ads are so obtrusive that you have to worry about people deleting them, then you should rethink your business.
Firebug runs in the context of the displayed page, and since pages' scripts can alter dom and delete things, firebug can too.
However you can run some javascript to check if the ad is deleted, and restore it, but still that javascript can be stopped/disabled with firebug.

GWT History and IE6 / 7

I've asked this question on the GWT group with no luck, so now I'm trying Stack Overflow :)
There seems to be some problem with GWT's history and IE6 / 7, and I'm trying to confirm this is an actual problem with GWT and not just something stupid I've done.
The problem I run into is the following:
Imagine you have some GWT app that plugs in to your existing website. It has internal history and works fine. Let's just say it's a tree. What it is isn't important, just that it has state that you can go back and forwards in. Part of this app is links to other parts of your website. Click one of those and you exit the GWT application.
Now, use the "back" button after you've clicked one of these links. You return to the GWT application which loads fine and the state is recreated using whatever is in the URL.
If you the click back again, here's where I get differing results in IE6 / 7 and FF / Chrome / IE8. In IE6 / 7 this second "back" sends me to the page before the GWT app. In FF / Chrome / IE8 this second back sends me back in the state of the GWT app, which is what I want, naturally.
I've checked my code, and as far as I can see, this second "back" just goes directly to the page before. My history handler is never called, at any rate.
Has anyone else run into this? Or know of anywhere this problem is discussed? I've googled extensively with no results.
The GWT group is to noisy to get confirmations of potential bugs, it's mostly for beginners.
The approach I take when I start to assume that there is a bug in GWT, and after trying to get help from the GWT group, is to create an issue in the GWT issue tracker and cross posting in the GWT contributors group as well.
Here is the URL for creating an issue:
http://code.google.com/p/google-web-toolkit/issues/list
Make sure that you first search the issue list for possible duplicates.
I've not yet played with history in GWT since our apps are running in an IFrame and that just kills the possibility to implement history.