PDA

View Full Version : File saving



nkumar0101
11-02-2007, 11:25 AM
I want a code using which whenever a user open my website ,the page of my website will automatically store in his/her computer.(My website is based on PHP-MySQL)
Its urgent

jc_gmk
11-02-2007, 11:37 AM
If i went to your website I know i wouldn't want your web page stored on my computer automatically!

Maybe you could create a link, so the user can choose to download the page at his/her discretion?

djr33
11-02-2007, 11:38 AM
Not possible for security reasons.

Javascript certainly can't do it.

You could use PHP to output a file for download, but it would be entirely the choice of the user whether they accept that or not.


The only possibility here is ActiveX (a big security risk and often blocked, plus ONLY works in Internet Explorer, so that's basically pointless), or a Java applet, which would work out ok, but requires Java installed and enabled (security issue), and that's hard to program.


If you give some more information we might find another way to accomplish your goal, but this isn't going to work.

jscheuer1
11-02-2007, 12:56 PM
Most web pages are automatically stored on the user's computer. It's called browser caching and it usually allows the same page to load faster the next time the user visits. However (due mostly to ignorance), aside from perhaps being able to clear the cache, and set its size limits, or to turn it off, most users have no real control over it or use of it other than its automatic functions for the browser.

Why did you want the copy of your page to be on the user's computer?