Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
J.R. Champ
13,263 PointsMedia queries make website loads very slow ?
I've recently had to change a non responsive website in a responsive one. As i didn't want modify the structure of the code that is already in place, i managed to make it responsive only with media queries by linking a second css stylesheet with my media queries without making any changes in the old code.
Is it correct to do this or it can make the website crash ? I was wondering because since i made the changes, the website is very slow and there is a lot of 504 gateway time-out errors occurs several times. Maybe it is a coincidence..?
Thank you guys !
2 Answers
Rikky Yoelanda Putra
2,317 PointsHi, any modifications to your css for the layout may not slowing your website. Gateway time out errors is server side problem about your web server configurations, so it's not related to your website. If you feel your website is too slow in your code, try to rearrange your code, if you have some javascript, try to place it below your codes. Some javascript, especially if you get it from external source (like code.google.com or something else) will take time to load until finish and then load another part, better place it below your website element codes so it will load your layouts and elements first, then load the effects, at least your visitors can see your contents first even without any javascript beauty.
J.R. Champ
13,263 PointsThx Rikky !