Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    Controllo cache immagini

    ho realizzato uno script php che mi permette di creare un tumbnail da una immagine.

    ora vorrei aggiungere una funzione che controlli se l'immagine è già presente nella cache del browser ed in caso negativo avvii lo script x crearla.

    qualcuno sa aiutarmi?
    Kill what might have been :sexpulp:
    Webmaster: a.galli85@virgilio.it

  2. #2
    Utente bannato
    Registrato dal
    Sep 2005
    Messaggi
    905
    quelle sono operazioni lato client, php è lato server. fallo con javascript.

  3. #3
    si ci avevo pensato ... ma se controllo con javascript ... poi come faccio a dire a php di nn creare la img?

    nn sono molto ferrato sulla comunicazione tra script
    Kill what might have been :sexpulp:
    Webmaster: a.galli85@virgilio.it

  4. #4
    Utente bannato
    Registrato dal
    Sep 2005
    Messaggi
    905
    perchè farlo, i browser lo fanno automaticamente...

  5. #5

    META TAG

    invii l'header della pagina con la funzione header dicendo al browser che non deve essere messa in cache anche se non so quanto effettivamente funzioni

    leggiti le informazioni dei meta tag a me viene in mente questa

    codice:
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    
    HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
    Public - may be cached in public shared caches
    Private - may only be cached in private cache
    no-Cache - may not be cached
    no-Store - may be cached but not archived
    
    The directive CACHE-CONTROL:NO-CACHE indicates cached information should not be used and instead requests should be forwarded to the origin server. This directive has the same semantics as the PRAGMA:NO-CACHE.
    Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cache request is sent to a server not known to be HTTP/1.1 compliant.
    Also see EXPIRES.
    Note: It may be better to specify cache commands in HTTP than in META statements, where they can influence more than the browser, but proxies and other intermediaries that may cache information.
    Soluzioni di Web marketing, CMS, Temi wordpress, grafica e molto altro

    -----
    Ogni topic aperto con un titolo errato fa perdere un capello al moderatore che lo dovrà sistemare.. se non vuoi contribuire alla calvizia dei moderatori apri 3D a norma di regolamento, e prima fai una ricerca! No pvt tecnici!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.