Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    17
    Vote Rating
    0
    jlozina is on a distinguished road

      0  

    Default Ie7 caching problem

    Ie7 caching problem


    Hi

    When using json to communicate with the server in Intenet Explorer 7 it caches the request so I dont get the latest data.
    In Firefox the request gets processed every time.

    Can someone let me know how to add a timestamp/parameter to the BasePagingLoader/json request so

    http://localhost:8080/ProductApprova...art=0&limit=15

    would appear as

    http://localhost:8080/ProductApprova...=1242172212329

    Code is

    Code:
            ColumnModel cm = new ColumnModel(ApprovalProcessGridHelper.getColumnConfig());
    
            // Incoming data model type
            ModelType type = ApprovalProcessGridHelper.getModelType();
            RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, "/ProductApproval/controller.json");
    
            HttpProxy proxy = new HttpProxy(builder);
    
            // Reading Json data
            JsonReader<PagingLoadConfig> reader = new JsonReader<PagingLoadConfig>(type) {
                @Override
                protected ListLoadResult newLoadResult(PagingLoadConfig loadConfig, List<ModelData> models) {
                    PagingLoadResult result = new BasePagingLoadResult(models, loadConfig.getOffset(), loadConfig.getLimit());
    
                    return result;
                }
            };
            // Loader
            final BasePagingLoader loader = new BasePagingLoader(proxy, reader);
            
            loader.setRemoteSort(true);
    
            // Store
            ListStore<ModelData> store = new ListStore<ModelData>(loader);
    
            // Grid
            grid = new Grid(store, cm) {
                //show loading... on startup 
                protected boolean loaded;
                protected void onAttach() {
                    super.onAttach();
                    if (!loaded) {
                        loaded = true;
                        
                        loader.load();
                    }
                }
            };
    
            grid.setLoadMask(true);
            grid.setTitle("Approval Process");
            grid.setBorders(true);
            grid.setEnableColumnResize(true);
            grid.setStripeRows(true);
            grid.setWidth(1200);
            grid.setHeight(600);
            grid.show();

  2. #2
    Ext JS Premium Member jadrake75's Avatar
    Join Date
    Sep 2008
    Posts
    108
    Vote Rating
    3
    jadrake75 is on a distinguished road

      0  

    Default Set headers or query parameters?

    Set headers or query parameters?


    There are a few ways to do this.
    (1) Set the request header indicating you need a non-cached request (preferred)
    (2) add something to the query string that is "random" like a request count from the page. (this is similiar to a sessionID). If your request URL is "unique" IE will not cache it.

    Method 2 will be more difficult for you since your request builder/proxy is setup for a store and without a subclass of a Proxy/Builder there is no way to do this "on the fly" (I created my own RestfulHttpProxy for processing some of the REST requests in which I needed to change the uripath.)

    Your best option is to set headers on the RequestBuilder. There is a method "setHeader( )" on this class (see GWT Javadoc).

    If you look at the HTTP 1.1 RFC: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    You will want to use the "Cache-Control" key. For no caching, you should try the

    builder.setHeader("Cache-Control","no-cache");

    Another option is the "must-revalidate". See the RFC for these definitions.

    Finally, if you have control over the server, this is something you might want to do from that side. In my clients case, the client is not intelligent and simply processes what it is given. This this case, I have my server code setting the headers on the response such that the browser will always clear the data if appropriate.

Thread Participants: 1