Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop people from refreshing the page

Is there anyway for me to make it work so anyone who presses F5 or any refresh button will be moved to a different page, instead of it refreshing the page the user wants?

Something like :

If (refresh){

  goto "link to hopme page"

}

If not is there anyway for me to not allow refreshing on a certain page?

I have some people that are are just refreshing non stop and it is killing my bandwidth. It is a game site so I don't want to ban the ip's.

like image 735
yaar zeigerman Avatar asked Aug 05 '09 18:08

yaar zeigerman


People also ask

Can we disable browser refresh button?

The refresh button in the browser is native and cannot be circumvented. Even if you block the F5 keyboard button (or other keyboard combinations) the user can always click the refresh icon in the browser toolbar.

How do I stop chrome from reloading pages?

1. Navigate to chrome://flags/#automatic-tab-discarding. 2. Set Automatic tab discarding to Disabled.

How do I stop my page from refreshing a link click?

To prevent reload with link onclick without "#", we can call e. preventDefault inside the click event handler. to add a link. to select the link with querySelector .


1 Answers

Perhaps you should be focusing your effort instead on reducing the bandwidth your page is using. Explore the areas of image compression, page optimization and caching.

like image 111
Gav Avatar answered Sep 23 '22 02:09

Gav