GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Turn off caching in Chrome? (https://gfy.com/showthread.php?t=1353119)

Publisher Bucks 03-14-2022 07:58 AM

Turn off caching in Chrome?
 
Anyone know what the process is to stop Google Chrome from caching website content?

Specifically when it comes to stylesheets.

youradultporn 03-14-2022 08:27 AM

If we are talking about tags by type:
<link rel="stylesheet" href="/style.css">

it is enough to add any get request to the link, and when you want everyone to have the file updated, update the value in the get request. For example:

<link rel="stylesheet" href="/style.css?v=1">
<link rel="stylesheet" href="/style.css?v=2">
<link rel="stylesheet" href="/style.css?v=3">

dave90210 03-14-2022 01:10 PM

Quote:

Originally Posted by Publisher Bucks (Post 22978243)
Anyone know what the process is to stop Google Chrome from caching website content?

Specifically when it comes to stylesheets.

Are you talking about 1 local browser as in testing, or all browsers as in production? If the latter, are you using a reverse proxy like cloudflare?

Code:

style.css?<?php echo time(); ?>
Nginx or cloudflare rules at the server level and f12 in chrome to disable caching locally.

Caching is a huge bitch. the bane of my existence. I hope this helps you.

vdbucks 03-14-2022 02:06 PM

Windows/*nix: Ctrl+Shift+R
Mac: Cmd+Shift+R

Doesn't disable caching, but it clears it for the current page on reload.

Publisher Bucks 03-14-2022 03:48 PM

Awesome, thank you all for the help :)


All times are GMT -7. The time now is 12:21 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123