If I have large javascript files that need downloading, I don't want them to be re-downloaded every time a user clicks on another page within my site that uses the same file. Is there a way to get them to download the javascript oncedownload javascript?
I believe your JavaScript files get cached by the browser.
you have to write a cookie that checks if your java-script file still exists (because the user may delete it) in "Temporary Internet Files" folder, if yes then it won't download javascriptdownload it.
Positive side:
Your website will fast be opened
Negative sides:
If you update your javascript-file, you'll have to write a new cookie to replace the old file and the old cookie with the new ones.
No comments:
Post a Comment