Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Obrazki "zostają" zapamiętane, co może być przyczyną?
adam1024
post
Post #1





Grupa: Zarejestrowani
Postów: 110
Pomógł: 0
Dołączył: 13.02.2009

Ostrzeżenie: (0%)
-----


Posiadam skrypt który tworzy obrazki i wstawia je na strone, po ponownym uruchomieniu skryptu i wytworzeniu nowego obrazka, tak jakby w "pamięci" przeglądarki zostają te stare, dodam jeszcze że gdy pobiorę nowo utworzony obrazek poprzez FTP'a wszystko jest w porządku, mam nowy i jest okej.
Dlaczego więc na stronie profilu nadal zostaje stary obrazek?

czy to ma coś wspólnego z kompresją gzip? czy może ważnością plików w .htaccess?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
adam1024
post
Post #2





Grupa: Zarejestrowani
Postów: 110
Pomógł: 0
Dołączył: 13.02.2009

Ostrzeżenie: (0%)
-----


1. tak, nowy i stary plik mają taką samą nazwę
2. lokalizacja jest trzymana w bazie danych (ale wraz z podmianą stare dane są usuwane, i nadpisywana jest nowa wartość)
3. w trybie incognito sytuacja jest taka sama, tylko przez FTP'a jak pobiorę to jest w porządku
4. htaccess wygląda tak:
  1. <ifModule mod_gzip.c>
  2. mod_gzip_on Yes
  3. mod_gzip_dechunk Yes
  4. mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  5. mod_gzip_item_include handler ^cgi-script$
  6. mod_gzip_item_include mime ^text/.*
  7. mod_gzip_item_include mime ^application/x-javascript.*
  8. mod_gzip_item_exclude mime ^image/.*
  9. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  10. </ifModule>
  11.  
  12. # BEGIN Expire headers
  13.  
  14.  
  15. <ifModule mod_expires.c>
  16. ExpiresActive On
  17. ExpiresDefault "access plus 5 seconds"
  18. ExpiresByType image/x-icon "access plus 2592000 seconds"
  19. ExpiresByType image/jpeg "access plus 5 seconds"
  20. ExpiresByType image/png "access plus 2592000 seconds"
  21. ExpiresByType image/gif "access plus 2592000 seconds"
  22. ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  23. ExpiresByType text/css "access plus 2592000 seconds"
  24. ExpiresByType text/javascript "access plus 2592000 seconds"
  25. ExpiresByType application/javascript "access plus 2592000 seconds"
  26. ExpiresByType application/x-javascript "access plus 2592000 seconds"
  27. ExpiresByType text/html "access plus 600 seconds"
  28. ExpiresByType application/xhtml+xml "access plus 600 seconds"
  29. </ifModule>
  30. # END Expire headers
  31.  
  32. # BEGIN Cache-Control Headers
  33. <ifModule mod_headers.c>
  34. <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
  35. Header set Cache-Control "public"
  36. </filesMatch>
  37. <filesMatch "\.(css)$">
  38. Header set Cache-Control "public"
  39. </filesMatch>
  40. <filesMatch "\.(js)$">
  41. Header set Cache-Control "private"
  42. </filesMatch>
  43. <filesMatch "\.(x?html?|php)$">
  44. # Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
  45. Header set Cache-Control "public"
  46. Header set Pragma "no-cache"
  47. </filesMatch>
  48. </ifModule>
  49. # END Cache-Control Headers
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 02:19