# Does Ionic React 8 Cache CSS Files

**URL:** <https://forum.ionicframework.com/t/does-ionic-react-8-cache-css-files/242650>\
**Category:** Ionic React\
**Created:** [June 25, 2024, 2:50pm UTC](https://forum.ionicframework.com/t/does-ionic-react-8-cache-css-files/242650 "2024-06-25T14:50:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivamoon7](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@shivamoon7](https://forum.ionicframework.com/u/shivamoon7)\
**Post date:** [June 25, 2024, 2:50pm UTC](https://forum.ionicframework.com/t/does-ionic-react-8-cache-css-files/242650/1 "2024-06-25T14:50:25Z")

</div>

I am new to Ionic and React. I have created an Ionic React 8 project using the Ionic CLI. I have 2 pages which use their own CSS file with same CSS class names but different properties for the root level div. However, upon navigating to Page 2 from Page 1, Page 2 uses properties from Page 1 CSS file. Is this behaviour expected and if yes then how to fix this?

---

<div class="post-metadata">

**Author:** ![Hills90210](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Hills90210](https://forum.ionicframework.com/u/Hills90210)\
**Post date:** [June 25, 2024, 3:09pm UTC](https://forum.ionicframework.com/t/does-ionic-react-8-cache-css-files/242650/2 "2024-06-25T15:09:20Z")

</div>

> [@How to make css not global](https://forum.ionicframework.com/t/how-to-make-css-not-global/216156):
>
> Hello i am making my first react ionic application and i have a question about styling. I used the tabs ionic project template. I have a page called ‘home.tsx’ and a css file ‘home.css’. Inside is a custom created component. this component is called ‘CustomCard.tsx’ and i have a ‘CustomCard.css’ file. my problem is that when i use the CustomCard component inside my home.tsx, the css of the CustomCard.css file also gets used. For example: In CustomCard.css there is h1{ color: red; } i im…
