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'am facing a very odd case, with a website made with codeigniter a user (A) has his credentials saved in his browser to login faster, it happens that this user (A) see the credentials of another user(B) in his computer whereas the user (B) never use the computer of user (A).
How this can be possible ?
Both user use a MAC.
I can't pinpoint that exact issue but it could be that either your authentication is failing and rather than showing the users details it's showing another's on login.
You can check this by var_dumping your user session and checking that it's populating correctly:
var_dump($this->session->userdata(); or var_dump($_SESSION);
You also mentioned something about your browser storing and auto populating fields, use this code on your form elements to remove autofill (by the browser):
<input autocomplete="false">
Not all browsers adhere to this so you can also try:
<input autocomplete="new-password">
Or apply it to the form in general:
<form autocomplete="false">
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
why it's need to change URL when we are working with AJAX ? as example when google translate start translate phrase or word change URL? whereas all information are sending and receiving using AJAX.
URL is not required to change. Google does this for convenience so that you can share the link to the translation with another person.
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
Imagine you have a web page which has some static contents and some dynamic contents based on the user's session. For example, you may see a webpage with a menu at top of the page which displays username but the remaining content is completely cachable and static.
There could be a simple solution to achieve that:
You can handle the dynamic part of the page in the client side with ajax request (which is not cachable) e.g. single page applications.
There may be another solution that client sends a request to a middleware(e.g. API Gateway) and the middleware fetches static part from cache and dynamic part from the backend then returns aggregated content to the client.
In my idea, the worst solution is to disable the cache.
What Facebook is doing, loads dynamic part at first request, and loads remaining contents with XHR requests.
Questions:
What is the best practice for this issue?
What would be the drawback of the second solution?
What do you think about Stackoverflow top menu that displays your username?
An AJAX request (or fetch, or any other HTTP based request) may well be cached by using a RESTful service.
For more fine grained controll over what should be cached you could use a service worker, for example by adding https://developers.google.com/web/tools/workbox/ to your application.
If your dynamic data has to be updated live, you should also have a look at WebSockets. Depending on your stack you could use a wrapper library like SignalR, socket.io or simply follow one of the tutorials at http://websocketd.com/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm writing a blog application in Sinatra, and I want to collect some visit statistics.
As of now, I'm only thinking of getting more or less reliable visit statistics per user (that is, page visits grouped by users). Maybe later I'll want to get some client-related information (i.e., user agent).
How do I do that?
While you can use Sinatra to do this, the technology has already been implemented in other ways. I think the easiest solution is to put a piece of Javascript on the frontend that records this information for you. The most popular library for doing this is Google Analytics. This will give you far more information than you could easily capture yourself (screen size, device, etc..), and in a very clean format.
My idea to do it:
Use Rack sessions to determine the visitor ID;
Store the hits in a database table
Write a Thor task to unload it into something human-readable.
I'll appreciate any critique of this idea and/or any other ideas to do it.
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
What is the diffrence between Ajax and autocomplete function.
I know autocomplete is a software function that completes words or strings without the user needing to type them in full.
Ajax is similar to it + other functions.
AJAX stands for "Asynchronous JavaScript and XML" and offers an alternative to the traditional "request-respond-cicle".
With AJAX you can get data from the server without your browser having to re-render the whole page.
Autocomplete on the other hand side mostly uses AJAX to get possible results on every key hit by the users.
Read more about AJAX here:
http://en.wikipedia.org/wiki/Ajax_(programming)
Autocomplete works only using data suggestions from the cache, Ajax works using data suggestions from the server in addition to the data from the cache.
Using Ajax, we can render certain parts of a web page without a rendering the whole web page, which significantly reduces the network bandwidth.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I am using bf quiz plus plugin for Joomla.
Now i had sent an email notification to the user who give the test quiz. So one email notification is sent to the user.
Now there is by default from field for email is set which is <admin#joomla3.abs.com>
So I want to set this from field for email notification to donotreply#guru99.com
i have searched this on internet and on the documentation of bf quz plus but did not find any help. You can check here which plugin I am talking about - http://www.tamlynsoftware.com/products/bf-quiz-plus.html
And here you can check which from field I am talking about - http://screencast.com/t/3apKCJWm2fo3
So how to do this.
Please help
You can do one thing. Just search for the email in the files and replace it with your ID.