Mobile app version of vmapp.org
Login or Join
Moriarity557

: Google speed Insights displays CSS modifications but not when accessing the page I made some CSS changes to my website but they aren't displayed when I access the website. What's weird is that

@Moriarity557

Posted in: #Css #GooglePagespeed #WebDevelopment

I made some CSS changes to my website but they aren't displayed when I access the website. What's weird is that when I run a Google Speed Insights test, the screenshot displayed of the website has the changes I made.

=> goldnord.fr : the menu color is white. With Insights, it is brown (as wanted).

I don't use anything to cache pages... It's a complete mystery to me, does anyone knows how to deal with this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Moriarity557

1 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

This very much does sound like a caching issue. Some internet service providers and many businesses ass caching proxy servers to their networks to speed up internet speeds for users on their networks as well as to minimize upstream bandwidth as a cost saving measure. A Google PageSpeed Insight's is designed to be able to test your site as you make minor changes to improve the site speed Google is very careful about not caching the content and always testing against the origin server. The way most developers beat this problem is by adding cache break strings to the end of their script files during the development stage to force any caches in between their servers and browsers to ignore the cached content and fetch the most recent version from the server. The most common way of achieving this cache breaking string is by appending a random number as a query string to the end of the static resource filename, eg:
/styles.css?nocache=2934729349234 or /scripts.js?2398402802234.
As the random number is being added as a query string the web server still serves the correct file and as the static resource is not designed to handle the query string the query string is in effect ignored by everything except the caching proxy servers, but the caches treat each request for the same static resource as a request for a new resource as the query string is different each time making it a different and new URL which hasn't been cached before.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme