0

I'm not sure is this is an S3 issue or something with my website but would like to ask the community for some help.

Configuration: I have a static website (about 700KB) hosted on S3. My .css and .js is gzipped with the appropriate metadata set up. All objects in the bucket are using a cache-control with max-age equivalent to 7 days.

Issue: When I try to access my website from a private window in firefox, the website takes a while to load and then a very long time to go through the website's pages, etc.. This issue does not happen on client devices accessing the website in normal mode (non private/incognito).

Question: How do I start troubleshooting this? By reading this, does anything obvious come to mind? Is it the browser, the S3 or the HTML setup that is the issue?

Thanks!

  • What is the total amount of files/MB downloaded? My guess would be something is used from the disk cache, which isn't available in private. – Greg Askew Nov 28 '22 at 15:28
  • Are your website assets in proper size, corresponding to the size of the container they are in? – Tero Kilkanen Nov 28 '22 at 15:42
  • Thank you both. @GregAskew, I had a look and it seems the transfer size in a normal browser is essentially 0 as everything is loaded from cache. The transfer size in the private window is about 30KB according to the network tools which is roughly corresponding to the actual size of the files loaded. – carlitobrigante Nov 28 '22 at 15:51
  • @TeroKilkanen, I am not sure I fully understand your question, but the total size of all files in the bucket amounts to about 509Kb and the total size of the files on my local disk amounts to about 644Kb. – carlitobrigante Nov 28 '22 at 15:55
  • Then image file sizes are not an issue, if the total transfer size is that small. One problem that is often seen is that there are 1000x600 images in a 200x120 container on the web page. This means the browser has to download big image and scale it down -> page is slower than optimal. – Tero Kilkanen Nov 28 '22 at 16:00
  • Thank you @TeroKilkanen, won't the issue with the browser having to downsize images impact both normal and private window modes? – carlitobrigante Nov 28 '22 at 16:35
  • The problem is download, not resizing. In nornal mode the images are cached, in private mode not. So, in private mode browser has to download images -> if images are too big, download can take long time. You should check browser developer tools for breakdown of resource loading. – Tero Kilkanen Nov 28 '22 at 17:24

1 Answers1

0

I'm not 100% what the issue was but it was only happening in private mode when trying to access the s3 website endpoint directly via http.

After I've setup a cloudfront distribution with a custom route53 domain and an SSL certificate from ACM, I am now redirecting HTTP to HTTPS with the viewer policy.

Currently there is no latency issues regardless of private mode or normal browsing used.