Jump to content

Set Limits to user loading


cal20

Recommended Posts

Hi,

I'm just wondering if it's possible to set a code that prevents a user from constantly loading/refreshing your page.

I'd like to prevent them from opening 10 things at once, but instead having to wait like 10 or 30 seconds after opening one thing, before opening another.

 

Is that possible?

Thanks for your time.

Link to comment
https://forums.phpfreaks.com/topic/185318-set-limits-to-user-loading/
Share on other sites

Oh what I meant was, limit the user to one page load at a time.

For example, if they tried to right click on the "Home", "Contact Us", and "Forums" link and clicked "Open in new window" on all 3, I want something to block 2 of them from loading if they're already loading 1 page.

 

Thanks.

You would need to use php and java / ajax for this, track your users and guests and then store a value in a database based on the connected client i.e. a user or guest, holding their current page, use java / ajax to handle an event for the onunload event which will tell you that they have left a page, this should be sufficient to allow your server to realise that a page has been loaded but then when a user clicks a link or leaves the page your variable should be changed to reflect this.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.