0

Magento 1.9, comparatively speaking, What are the front-end performance issues between types of loading CSS as:

  • external
  • internal
  • inline
  • as a style block (CMS blocks).

Thank you so much for your expertise !

0

external : Not the best one : this adds additional HTTP requests and can delay rendering of the page.

internal : The best one : No HTTP request needed, the file is cached in browser in the first load for all pages, no need to load the file for each page.

inline : this css will be only loaded for that page and not all the pages and cannot be cached by the browser and re-used for another page.

as a style block: I don't know what you mean by this, but The recommended way is the second internal, you create your custom.css file in your current theme : skin/frontend/{package}/{theme}/css/custom.css, then you declare it in layout <head> part in app/design/frontend/{package}/{theme}/layout/local.xml and everythink will be fine.

Good luck.

| improve this answer | |
  • Thank you so much!! What I meant by 'a style block' is that I make CMS blocks that only contain CSS between style tags. Then I add them to my CMS page via a Widget. I have also started doing this with Jquery. I do it as a way of organizing. The reason is that I have a hard time finding the correct files to put the correct code in. The file system of magento varies so much and I always seem to be guessing as to if I am in the correct file. I have a ton to learn so thank you so much for your insightful, professional and expert knowledge. – Starkemp315 Jan 2 '19 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.