Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: clean cache

  1. #1
    New Coder
    Join Date
    Apr 2013
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    clean cache

    I would like to clear all cache memory when my login scripts runs so that i will not be suggested a name i ahve recently used to login in any browser. The same goes for the password field.

    At the moment when i login and starts typing their login credentials the browser tries to accommodate by predicting the credentials while you type.
    As a password goes it is even more important that the prediction is off.

    I hope i've explained it well enough.

    Any suggstions?

    please no smart answers since it would not help me but annoy me more... i'm only starting to get grips with this language and all programmers had to start somewhere.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Assuming you're talking about the browser autocomplete since it'd be silly to use AJAX to autocomplete usernames, this won't have a thing to do with PHP.
    I don't know if JS can force release history or not. I'll move it to the JS forum though since that may work.
    BTW, passwords should never be saved. Assuming input type is password of course.

    Edit:
    . . . and it wasn't explicitly set up to save in the browser. I meant that the history should not be saved in the actual password text field.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,030
    Thanks
    0
    Thanked 247 Times in 244 Posts
    Code:
    <input autocomplete="off" />

  • Users who have thanked glenngv for this post:

    wortmann (10-03-2013)

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,589
    Thanks
    0
    Thanked 644 Times in 634 Posts
    Quote Originally Posted by Fou-Lu View Post
    I don't know if JS can force release history or not. I'll move it to the JS forum though since that may work.
    The only way you could do it with JavaScript would be if you were to use JavaScript to update the HTML.

    Any server side language could be used to apply that same change without the need to rely on JavaScript being enabledsuming that you don't just update the HTML itself.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    New Coder
    Join Date
    Apr 2013
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    sorry but ur wrong!! it did work. thanks glenngv!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •