Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. DownLoad priority ?

DownLoad priority ?

Scheduled Pinned Locked Moved Web Development
htmlcssquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohammad Dayyan
    wrote on last edited by
    #1

    Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?

    S S 2 Replies Last reply
    0
    • M Mohammad Dayyan

      Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Mohammad Dayyan wrote:

      I want to the css file load on browser earlier than HTML file.

      Why?

      Citizen 20.1.01

      'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

      1 Reply Last reply
      0
      • M Mohammad Dayyan

        Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?

        S Offline
        S Offline
        stevio
        wrote on last edited by
        #3

        In order for the CSS file to load, it must be linked to (by an HTML file). So the answer is no - you can't really do it. The only way you could achieve a similar result is by pre-loading the CSS somehow, but there's not really much to be gained by doing this in most situations. Just put the CSS link toward the top of the page, and let the browser get it when it wants it. If you're having problems with the speed, try debugging it using firefox with the YSlow plugin. It gives you a lot of information about the structure of your page, and potential bottlenecks.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups