Jump to content

Stop new tabs


crimsonmoon

Recommended Posts

I'm not quite sure what you are trying to say here, but this is what I have. What you have is a table in MySQL, and you want to make it so people can't just refresh and keep making new entries into the table. This is easy to prevent.

 

There are a few options to solve this problem.

 

A) Just use the sleep(amount of seconds in here) function. That function will hault the script for however many seconds you insert.

 

or

 

B) Download the following file, and follow the instructions. It will stop users from refreshing by telling them they need to wait XX amount of seconds to post again.

 

EDIT: There is a sample of the file on this site; http://typrofiles.110mb.com/

 

FILE:

 

[attachment deleted by admin]

Link to comment
Share on other sites

Basically in my site many are opening tons of tabs and setting them to refresh at certain intervals which creates more load and creates an unfair environment for everyone else.

 

Firefox or Opera does it easily.

 

 

The only thing to to would be to increase the time allowed before a new page is allowed to open?

Link to comment
Share on other sites

You can't prevent people from opening tabs...what you can do is set a session variable, for example a "last loaded" value that contains a timestamp and the page name...then on each page check that timestamp. 

 

If a period of time, say 45 seconds, hasn't passed, then just display a simple text "You must wait ... to refresh this page".

 

Once the time period has gone by, they can load the page, then it resets the timer.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.