Save draft after page reload without registration via js or php [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In my site, user can write a text. I want to make that, when the user reloads the page, the draft will appear. Without any registration.
I think, using ip as id is bad idea, because it can be library wifi network, for example, and as far as I understand, all connected devices would have the same ip.
What is the best way to unify client for that purposes?

You should use cookies if you want it to be saved for a long time
PHP:
setcookie('text_cookie', 'My text', time() + 3600);//To save for an hour
echo $_COOKIE['text_cookie'];//To show

use javascript keyevent and localstorage

Related

How does Whatsapp keep me logged in [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
I'm experimenting by transfering cookies from one browser to another and I was surprised that all accounts I'm logged in to are also logged in in the new browser. My Whatsapp session however doesn't get transfered, I looked at the Whatsapp cookies and there were none of them.
How does Whatsapp keep me logged in? And is there a way to transfer one Whatsapp session to another browser?
WhatsApp web does not use cookies Instead, it uses offline website data.
For more info:
https://admx.help/?Category=Firefox&Policy=Mozilla.Policies.Firefox::H_SanitizeOnShutdown_OfflineApps
You might be able to transfer the data if you can find it.

How to validate user logged in web application (php)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Good day.
Could someone please tell me how I can control that a user does not enter a web application more than once?
Currently I am controlling it by storing the session that is created in php in a field of a table and through javascript using ajax I consult it every 10 seconds. I think there must be a better way ... thanks !!!
And finally solved it by validating that the session created is different from the previous one, thus updating it and the previous user wanting to validate his session in order to make any request will realize that it does not exist and this will remove him from the application .

How to register a user using only javascript/ajax or jquery [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm trying to register users using only javascript,ajax or jquery, i need to save the information of the users somewhere where i can get it even after the browser is closed,and the new information can't overwrite the old one.
I already tried saving into a xml file or txt file, but without success.
Check these out, one of it might help
http://www.w3.org/TR/IndexedDB/ - Indexed DB
http://www.w3.org/TR/webdatabase/ - Web Sql
http://www.w3.org/TR/webstorage/ - localStorage
You can as well try out a JavaScript Database here
http://www.taffydb.com/ still trying it out myself, hope this helps.

I want to add the button of screenshot of my customer's page and then want it to save in a database and show it in a another page as dashboard [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I tried using java script but it didn't work. I also tried php imagegrabscreen() but it demands URL whereas I have a customer's page URL different for everyone ex: /member.php?email=shady#gmail.com&code=A101_123 .
Basically I want to store user's screenshot so he can be able to see those images of his activity. So any solution?
I would recomment to take a look at html2canvas. It is a JavaScript solution that works on the client side. Only problem: It takes the current DOM from the user and builds a picture with the browser engine. So it is not 100% accurate, but pretty close.

Javascript + PHP timed actions [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Here is my goal:
Create some JavaScript action (some function call) that will be timed perfectly between two different clients.
Explanation:
I want a function to be called exactly on the same millisecond on two different browsers/computers no matter when the client accessed the web page.
I thought about creating a time base using the server time but im not sure this will work.
I think you should be using something Node.JS or APE (Ajax Push Engine) to achieve this.
so you want to do like this scenario: user come visit your webpage and he has to wait few seconds that page is shown?
This is useless to do in my opinion, unless you want to flood server with tons of requests..

Categories

Resources