Some questions about loading time.

Discussion in 'HTML & Website Design' started by mediba, Jun 7, 2006.

  1. #1
    I have some questions about loading time.

    1. If I exclude the all the css code and call it like this:
    <link href="/includes/style.css" rel="stylesheet" type="text/css" />
    Will the CSS be loaded for every pageview, or only once / visit?

    2. If I don't exclude the CSS, will it be loaded for every pageview or just once / visit?

    3. If I exclude the javascript like this:
    <script type="text/javascript" src="/includes/navigation.js"></script>
    Will it be loaded for every pageview, or only once / visit?

    4. If I don't exclude the javascript, will it be loaded for every pageview or just once / visit?

    I have a few follow-up questions on theese, I just need the confirmation that #1 and #3 are correct before I go ahead with them.
     
    mediba, Jun 7, 2006 IP
  2. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #2
    If you exclude any script like:
    <script type="text/javascript" src="/includes/navigation.js"></script>
    or
    <link href="/includes/style.css" rel="stylesheet" type="text/css" />

    it will be loaded only once, until the user does a hard refresh, otherwise if you have the scripts in code, it will be loaded every time the the users click on your link.

    You should not disable your site's caching also....

    Good Luck
     
    ludwig, Jun 7, 2006 IP
  3. mediba

    mediba Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, thanks a lot.
     
    mediba, Jun 7, 2006 IP
  4. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #4
    you're welcome
     
    ludwig, Jun 7, 2006 IP