AWS cloudfront serves outdated content in Google Chrome? - amazon-web-services

I have a react app installed in AWS s3. And I am serving the content using AWS CloudFront.
I have made some changes in the app and did invalidation in the CloudFront. It is serving updated content in all browsers excpet Google Chrome. Google Chrome loads the page with the old content.
Could you please let me know why it's happening?
Thank You.

Can you please check if your caching is managed on the cloudfront level or the client level?
Did you try to clear the browser cache? Because if your caching is being handled on the client level then clearing the browser cache should show you the updated content.

Related

Google Tag Manager doesn't work with AWS S3 hosted website

So I have a website hosted on AWS S3 with added SSL protocol https://calc2burn.pl. I have added a Google Tag Manager scripts to the index.html file, but when I'm clicking preview on GTM site I receive message that it can't connect to website.
After clicking preview the Tag Manager opens up site in a new tab but nothing more happens. I've added my code correctly. I've been searching for solution for last 15 hours. I thought that maybe it's a problem with CloudFare and have modified script as instructed but that didn't help.
The weirdest thing is that once for 100 attempts to reconnect I've received a massage that it has connected to website but the actual Tag Manager account site showed that it's not connected.
Ok, so obviously the old version of index.html was still in CDN cache. I had to invalidate all files in the CloudFront distribution. I have found all helpful information on this site.

Do static websites store cookies?

I am developing a static website and I will deploy it using a hosting service.
I am wondering whether the website will store cookies once deployed (perhaps set by the hosting service), and if and how I should ask users for permission since I have no backend but only frond-end html/css pages.
If there is only HTML and CSS then it stores no cookies. But if you have some javascript code in your website then you can use javascript to store cookies for remembering things. But for a simple HTML and CSS website cookies have no benefit to you and you can't access them.

Serving private media files from S3 to single page React App (Django DRF backend)

I have set up an S3 bucket on AWS where I upload my sensitive ‘media’ files from my Django DRF + React app. The files are not public. I use boto3 and Django-storages for that and the upload process works fine. I can also download the files for report generation from backend to return PDF response.
I would now like to display those files one by one from frontend. It seems like I now have two options:
Create a route in Django API/urls to handle media requests and point the app to the media directory. This way, the AWS login is handled by the backend server. This seems to beat the point of using a CDN as all media requests would go via the backend server?
Incorporate login credentials to React front end. This seems insecure.
What would be the recommended way to achieve this? I can’t seem to find the required information.
Thank you.

What are "SL_wptGlobTipTmp" and "SL_GWPT_Show_Hide_tmp" cookies?

I am seeing these 2 cookies on most all websites in my chrome browser.
Not in Safari and not in FireFox
Searching the web did not give me any information. Lots of websites list the cookies in their privacy Policy with different reasons for creating them.
I can not find the origin of the cookie creation or reason for it
wonder if it is some kind of hack or ?
SL_wptGlobTipTmp
SL_GWPT_Show_Hide_tmp
Its js generated cookies from a Chrome addon ImTranslator.

How to update a static html website hosted on Amazon S3

I have hosted a static HTML website hosted on aws s3 using the Udemy video tutorial Amazon Web Services (AWS) Certified 2018 - 4 Certifications.
I have successfully hosted the website, however when I attempted to update the site by changing the some text in the index.html file and then uploading the new index.html to S3, I do not see my updates. Rather, I see the original webpage content. Occasionally, I am able to refresh the page or close my Chrome browser in order to see my changes, however it is not stable. Please help!
It sounds like your browser is caching the content.
If you open a different browser (eg Firefox) and the content has updated, then everything is fine on S3. It's just a matter of clearing your browser cache or waiting for the cached content to expire.