dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Post-loading js files and browser caching.

  1. #1
    Join Date
    Mar 2008
    Posts
    70

    Post-loading js files and browser caching.

    Hi I'm trying to increase the speed of the user's first pageview of my website. I have a large js file for my site but most of it isn't needed for the display of the initial page-load. I want to separate it into 2 js files. The first file is essential for the display of the site. I want to load the second js file after the page is done loading. If I do that will the browser sill cache the second js file? Will their browser know on next pageview that it already loaded that file and not try to load it again? How do I give the user the second js file after the page is done loading but only if they don't have it cached already? If they have it cached they should just have it already and ideally not have to wait for the page to even be done loading.
    Last edited by curtay; 01-04-2012 at 09:14 PM.

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    you add the extra script to the bottom of the page right before the </body> tag

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles