JavaScript Introduction? Define, use and purpose. how can we reduce the web page loading time as far as javascript is concerned.
Hy, Try to include all javascript code into one or two .js files, and use cache in htaccess: # cache text, css, and javascript files for one week <FilesMatch ".(js|css|pdf)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # cache html and htm files for one day <FilesMatch ".(html|htm)$"> Header set Cache-Control "max-age=43200" </FilesMatch> Code (markup):
JavaScript is a scripting language that adds interactivity to HTML sites. There are numerous uses for it. Everything from embedding to detecting a visitor's browser (so your site uploads differently) can be done with JavaScript. There are two main ways to reduce page loading time. One, minimize onpage JavaScript usage and have them written on a separate file; two, compress your JavaScript (this is easy but often overlooked). Removing white spaces in your JavaScript reduces the size of data transferred; compressing the scripts (using tools like GZIP) easily cut half of the current size and thus free up some bandwidth.
How can we minimize the use of Javascript. Actually i am new in this field so give me some basic and high profile references regarding Javascript i wanted to read about it.
HELLO JAVAScript is THE scripting language of the Web.JavaScript is used in billions of Web pages to add functionality, validate forms, communicate with the server, and much more.JavaScript's use in applications outside web pages—for example in PDF documents, site-specific browsers, and desktop widgets is also significant. fetching a small amountof javascript from the server and alter the existing page by this we can decreace the load time Hope you got answer!
It depends on what it's needed for. JavaScript is THE scripting language of the web. check out "http://www.w3schools.com/js/default.asp" for a detailed introduction and examples. you can also check out "http://www.dynamicdrive.com" for an abundance of different real world examples and applications.
Yes, i got much of my answer but what about load the javascript file as referenced to minimize the loading of a web page. Do you know about it? i had read it in some blog post when i was searching. thanks for cooperating