SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    whats good & whats bad abt this idea !!??

    whats good & whats bad about this idea
    -i need to have a list of all cities and regions inside a doplists.
    -these data are loaded from javascript file .
    -the cities and regions are generated dynamicaly in an array form inside the javascript file.
    idea is to genereate this js file on my server rather than loading all the cities and regions in every page header.

    Q's??
    does the explorer load the javascript every time u surf a new page in the website??
    i hope u understood me , please comment my post and tell me what u like and what u dont like about this idea
    lebanon real estate www.REmonitor.com beirut apartment for sale

  2. #2
    *********! *********!!! jackli's Avatar
    Join Date
    Sep 2005
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's a doplist?

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    droplist = <select> ????
    lebanon real estate www.REmonitor.com beirut apartment for sale

  4. #4
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well, data should be sored in database. Anyway, browsers cache the files, so they do not reload the same js file on every page.

    What's also wrong about storing the list in javascript is that the visitors with js disabled won't be able to use it.
    Saul

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by haidoura
    does the explorer load the javascript every time u surf a new page in the website??
    assuming you will keep the javascript arrays in an external file, then you are able to control whether the browser should cache it or not, and if so, for how long. this is configured by sending the appropriate http headers.
    http://www.mnot.net/cache_docs/


    by default, most webservers will send semi cache friendly headers for a .js file
    again in default form, the browser will usually still need to ask the server on each page request if thier js file is stale, and will only redownload it if the webserver sais it is. this constant rechecking for freshness is wasteful and slows page loads a tiny bit.

    if you want to adjust it for better performance, apache makes it easy
    http://httpd.apache.org/docs/1.3/mod/mod_expires.html


Bookmarks

Posting Permissions

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