raksha-life / rescuekerala

Website for coordinating rehabilitation of people affected in the Kerala Floods
https://keralarescue.in
MIT License
676 stars 575 forks source link

Frontend changes for faster page loading #85

Closed sreenadh closed 6 years ago

sreenadh commented 6 years ago
  1. Avoid all other CSS files except bootstrap
  2. Use standard browser font. Remove 'raleway'
  3. Put request for help in home page and give other links on right side. two column layout
  4. Load logos on top asynchronously.
  5. If possible remove bootstrap and use table layout for faster loading.

83 #84

visakhsuku commented 6 years ago

i could help with 2nd one

sreenadh commented 6 years ago

Remove the district column in 'view requests'. not necessary @biswaz

shabinGravitum commented 6 years ago
  1. If possible remove bootstrap and use table layout for faster loading.

The design is responsive and looks well on mobile, do you really want to do this?

sreenadh commented 6 years ago

@shabinGravitum to reduce page load time. not for responsiveness.

bodhish commented 6 years ago

Use tailwind, only styles which are used will be loaded to production

sreenadh commented 6 years ago

Use single external CSS file or use inline style.

prajintst commented 6 years ago

reduce the use of images and styles. move images and assets to s3bucket or cdn.

ivalsaraj commented 6 years ago

@shabinGravitum Table is messed up. See the mobile view. capture1

visakhsuku commented 6 years ago

105 for 2nd one

prajintst commented 6 years ago

Please use it https://github.com/django-compressor/django-compressor

naveenpf commented 6 years ago

Many issues reported in one ticket. Please log separate one

sengar23 commented 6 years ago

Couple of fixes I used and managed to bring down the website size from 172 kb to 105 kb, which will definitely help in reducing the load time of the site on weaker connections. The fixes are listed below:

  1. Don't use an external font (very important). Use default font provided by bootstrap.css. Removed the loading of font.css file in base.html.
  2. Did the optimization the images, retaining the original features but reduced the file size to 60% of total image data downloaded on loading of the website. Below are the links of the optimized image: https://ranjeetsengar.com/keralarescue/kerala-government.png https://ranjeetsengar.com/keralarescue/it-mission.png https://ranjeetsengar.com/keralarescue/ieeelogo.png https://ranjeetsengar.com/keralarescue/emblem.png

Note: I'm sharing the link of the screenshots of the fixes done https://ranjeetsengar.com/keralarescue/keralarescue1.png https://ranjeetsengar.com/keralarescue/keralarescue2.png

Hope this helps.

asimqt commented 6 years ago

Anybody working on rewriting CSS? (Remove bootstrap)

sengar23 commented 6 years ago

If we remove bootstrap then the 'Glyphicons Halflings' will also be gone and there won't be any icons. Is that okay? I suggest to let go of the icons, it will reduce 18kb of total website size.

sengar23 commented 6 years ago

I'm working on the custom css which will replace bootstrap.css and further reduce the total website size. let me know if anyone else is working on it.

prajintst commented 6 years ago

@sengar23 try to minimize the css and js file.

sengar23 commented 6 years ago

We are loading 'Montserrat' font in templates/base.html. Are we loading that external font for any reason? Because I can't find it being used anywhere. Please let me know. Thank you.

prajintst commented 6 years ago

I think it is better to remove all external fonts. also remove the references.

asimqt commented 6 years ago

@sengar23 We removed that font in some PR. NOt sure whether it's merged or not.

sreenadh commented 6 years ago

Good work guys 👍