search

Home  >  Q&A  >  body text

javascript - How to load css and js on demand without webpack


Now the header resources are extracted using the php template, but the css js resources of each page are different. If all resources are written in the PHP template, it means that each page may load resources that it does not need. How to load different pages on demand? (provided that tools such as webpack are not used)

我想大声告诉你我想大声告诉你2793 days ago667

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-06-05 11:09:38

    requireJS

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-05 11:09:38

    This is a multi-page application. The shared JS and CSS references are written in the template, and each page references them separately

    reply
    0
  • Cancelreply