Score:0

S3 static website is loading pretty slow on private window mode only

cn flag

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!

cn flag
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.
us flag
Are your website assets in proper size, corresponding to the size of the container they are in?
carlitobrigante avatar
cn flag
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 avatar
cn flag
@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.
us flag
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.
carlitobrigante avatar
cn flag
Thank you @TeroKilkanen, won't the issue with the browser having to downsize images impact both normal and private window modes?
us flag
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.
Score:0
cn flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.