Swarn Palace
Full Stack Developer · Completed
Overview
A freelance multi-page site for Swarn Palace covering rooms, menu, gallery, and a table-reservation flow. Built a fully responsive HTML5/CSS3/JavaScript front end with a contact/reservation form wired to a small PHP mailer. Handled hosting and deployment end-to-end.
Key Highlights
- ▹Multi-page freelance site: rooms, menu, gallery, and reservation booking
- ▹Fully responsive across desktop, tablet, and mobile viewports
- ▹End-to-end ownership: design, development, hosting, and deployment
- ▹Static HTML5/CSS3/JavaScript site; the heaviest photos were re-compressed (home page 3.3 MB to 1.5 MB) and the hero slider no longer shifts the layout (CLS 0.52 to 0)
Tech Stack
Challenges & Solution
The home page weighed 3.3 MB, mostly seven oversized photos (the largest 1.2 MB), and the hero slider script resized every slide image after it loaded, moving the whole hero (layout shift 0.52 on a mobile profile). I re-encoded the photos (long edge 1,400 px, quality 0.78; the 1.2 MB image became 113 KB), added dimensions and lazy loading to the gallery, sized the slider images in CSS so the script has nothing left to move, and fixed a lightbox link whose capitalisation returned 404 on GitHub Pages.
Performance Optimizations
Mobile profile (375×812, 4× CPU, 9 Mbps / 150 ms, cold cache), original versus fixed, 9 paired rounds on the home page: transfer 3,271 KB to 1,542 KB (−53%), 46 to 40 requests, layout shift 0.519 to 0.000. Largest contentful paint stays several seconds on that throttled profile because the remaining cost is script execution.
Lessons Learned
Weight is not speed: halving the payload helped a little and removing the layout shift helped a lot, but the jQuery, Bootstrap and plugin stack still dominates load time on a throttled phone, so the honest claim is "images compressed, layout-shift-free hero", not "optimised load performance". The real fix would be a rebuild without the plugin stack.