Skip to content

Commit

Permalink
[#11041189] small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gregolsen committed Jun 29, 2011
1 parent 9ee961a commit 740350e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ Recommendations

1. Be mindful while organazing and linking your resource files
WebResourceBundler combines all resource file in one. This resulted file could be huge.
a. Don't link all resources in layouts!

* Don't link all resources in layouts!
Be sure to link resources (css\js) only for pages that using them, in other case your users will be forced
to download huge css\js files with unused content.
b. One css for one page.
* One css for one page.
Try to slice you css files - separate file for each particular page.
c. Separate bundle block for crucial resources
* Separate bundle block for crucial resources
To make crucial resources (basic styles\scripts for user can see basic page layout ASAP) load first - just bundle them in separate web_resource_bundler_process block and put this block at the top of your head block.

2. Don't set max_image_size to big values.
Expand All @@ -124,5 +125,6 @@ on the client side. But your scripts are bundled and their relative path changed
won't be able to compute loaded file path correctly. You should avoid bundling such tricky javascripts.

4. Unexistent resources handling
a. Be sure to link in html only existent resource files, otherwise bundler won't work.
b. If you have unexistent images in css, bundler will work but you've got info messages in log.

* Be sure to link in html only existent resource files, otherwise bundler won't work.
* If you have unexistent images in css, bundler will work but you've got info messages in log.

0 comments on commit 740350e

Please sign in to comment.