http,caching,seo,uri,url-parameters , Does HTTP URL parameter order matter for caching? [closed]


Does HTTP URL parameter order matter for caching? [closed]

Question:

Tag: http,caching,seo,uri,url-parameters

Are the two URLs equivalent with respect to browser caching and website seo?

1 - http://example.com/resource.html?a=a&b=b
2 - http://example.com/resource.html?b=b&a=a

If the resource for the first URL is cached and the browser needs to find the resource for the second URL can it use the cached resource? I want to know about the caching because I can ensure all internal links use the same parameter order to increase cache performance.

Also, if my server treats these URLs as the same resource, which URL will be indexed by Google? With consideration to SEO, will this count as duplicate content? If so, I could use a 301 response to redirect to the correct URL. (This should also fix the caching problem.)


Answer:

If the resource for the first URL is cached and the browser needs to find the resource for the second URL can it use the cached resource?

That is not certain. It depends on each browser implementation. But if you always use the same parameter order, then it is not an issue in the first place.

Also, if my server treats these URLs as the same resource, which URL will be indexed by google?

Both will be indexed by Google, but if you use canonical links or if you configure parameters in Google Webmaster Tools, then they can be treated as one when displaying search results (i.e., Google will give the preference to one URL and it will collect the PageRank and other signals from the other).

With consideration to seo, will this count as duplicate content? If so, I could use a 301 response to redirect to the correct URL.

Yes, it will be considered as duplicate content, because the URLs are different. Using a redirect in this case is shooting flies with a canon (IMHO), but it would work.


Related:


App Not Downloading Newest Version Of File [Java]


java,caching,download
Okay, I've been trying to figure this out for a few hours and it's starting to kill me. I wrote a primitive version checker for an app I work on every once and awhile. It's just a simple for fun project. The version checker has been a pain though. It...

Server initiated requests


http,go,http2
I know that http is a request-response protocol, the problem in short is a client makes a request to the server to start a long running process, and i want to inform the client over the progress with a simple json message containg progress info. in http1 i know that...

How to return value in Meteor.JS from HTTP.call “GET”


javascript,ajax,http,meteor,facebook-javascript-sdk
I'm writing a meteor method, which should return a Facebook response for HTTP.call on graph api, but HTTP.call has only a callback function to show error/response, so I can't take this data outside, and Method can not return any value. Here's my method code: loadUserFBEvents: function () { var accessToken...

How to create the get method for the call


php,arrays,json,http,quickblox
I am studying and implementing an api and while following the examples, Here is the example 1 : curl -X POST \ -H "Content-Type: application/json" \ -H "QuickBlox-REST-API-Version: 0.1.0" \ -d '{"application_id": "2", "auth_key": "DtF9cZPqTF8Wy9Q", "timestamp": "1333630580", "nonce": "1340569516", "signature": "13293a5bd2026b957ebbb36c89d9649aae9e5503", "user": {"login": "injoit", "password": "injoit"}}' \ https://api.quickblox.com/session.json For the...

Python exception for HTTP response codes


python,http,exception
I'd like to raise a Python-standard exception when an HTTP response code from querying an API is not 200, but what specific exception should I use? For now I raise an OSError: if response.status_code != 200: raise OSError("Response " + str(response.status_code) + ": " + response.content) I'm aware of the...

PHP How to not cache generated HTML but cache static data like images/js/css


javascript,php,css,image,caching
Many PHP developers add the no-cache header on top of their PHP pages, so do I, for obvious reasons. Since PHP generated content is usually dynamic, having the browser cache them results in outdated data being presented to the user. To avoid this caching is usually disabled. <?php //no cache...

AngularJS $http request using forEach inside of Controller


angularjs,http,foreach
http://codepen.io/rcidaleassumpo/pen/eNEjGY?editors=001 That's the link for the code. Below I first used the forEach to combine the nicknames with the base link, so I could get the fullLink to make the call for with the $http. But then when I tried to make the call, and post into a empty array,...

Cache ruining Jquery Code?


javascript,jquery,caching
My problem might be naive, but basically I have a simple Jquery script running on a site to determine the margin height of divs based on the contained image's height: <script type="text/javascript"> $('.artobject').css('margin-bottom',$('.img-wrap').height()); </script> The problem is that it runs once, but after the page is reloaded the code begins...

Unzipping Multiple Files - Java


java,caching
I'm working on an auto updater for a game client and I've run into an issue. What I need it to do: Download cache.zip and client.zip. Extract cache.zip to cacheDir and extract client.zip to the same location they are running the jar(game). What it does right now: Downloads both cache.zip...

Detemine memory used by Hazelcast cache


java,caching,memory,hazelcast
I'm implementing the backend of a game in Java and I was told to use Hazelcast to cache some data from the database. How could I find out how much memory is used by the cache (necessary to determine the business cost of this solution)?

Caching Views in XAML changes appearance?


xaml,caching,windows-store-apps
I'm caching Views in XAML in order to improve performance (don't need to load the controls again). Does this make sense / improve performance of loading controls? Problem is, although I'm caching / loading the same thing, it seems when I use the Cached View, it has a different appearance....

Custom HTTP Header or cookies? how custom authentication/authorization helps in CSRF?


javascript,http,cors,csrf
If someone can help me understand how a custom HTTP authorization header helps protect CSRF attack. Also correct me if i'm wrong does it prevent replay attacks using fiddler also? Thanks for your help in advance...

Understanding Memory Replays and In-Flight Requests


caching,cuda
I'm trying to understand how a matrix transpose can be faster reading naively from columns vs. rows. (example is from Professional CUDA C Programming) The matrix is in memory by row, i.e. (0,1),(0,2),(0,3)...(1,1),(1,2) __global__ void transposeNaiveCol(float *out, float *in, const int nx, const int ny) { unsigned int ix =...

Caching issue in angularJS application


angularjs,caching,orm,eloquent,slim
I've an admin panel which is a pure angularJS application, which uses REST api for data manipulation. REST api is built using SlimAPI framework and Laravel's Eloquent ORM. I'm facing caching issue in admin panel. Even though if a add new content to the system, it'll not show up in...

Why I got so many connection events on Node's HTTP server?


javascript,node.js,http,websocket,socket.io
I have a web application using socket.io. It runs on localhost:8000 on my local machine. In order to find an annoying resource leak in my application, I tried to log out the connection events on my HTTP server: server.on('connection', function(conn) { //log out connection details }); When I open the...

How to call posts from PHP


php,wordpress,caching,cron,call
I have a website, that uses WP Super Cache plugin. I need to recycle cache once a day and then I need to call 5 posts (URL adresses) so WP Super Cache put these posts into cache again (caching is quite time consuming so I'd like to have it precached...

Headers for security


security,http,header
I've been reading articles about the protection of your website and they say to place these 3 headers: X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff In my website to protect it from Website attacks, but I dont know how to declare it in my header, can someone help me with...

Python - sending http requests as strings


python,http,get
How can I send HTTP requests as string with python? something like this: r = """GET /hello.htm HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.stackoverflow.com Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive""" answer = send(r) print answer # gives me the response as string ...

Caching in Webview is not working in Android


android,caching,webview,browser-cache,offline-caching
When I open webview, it runs great when there is a network connection, but I have enabled caching in it, and without a network connection, it shows an error and loaded cached web page is not showing. I have enabled caching and also set cache mode, but it's not working....

Docker container http requests limit


http,elasticsearch,docker
I'm new to Docker so, most likely, I'm missing something. I'm running a container with Elasticsearch, using this image. I'm able to setup everyhing correctly. After that I was a using a script developed by a collegue in order to insert some data, basically querying a MySQL database and making...

How to omit creating static Map for data caching?


java,caching,static,hashmap
I want to know if it is possible to omit creating cache with static Map instance. Here is snippet of my class: public class XpathEvaluator { private DocumentBuilder builder; private XPath path; private Document document; private static Map<String, List<String>> cachedXpaths = new HashMap<>(); private XpathEvaluator() throws ParserConfigurationException { DocumentBuilderFactory factory...

Which Http error/status code is the appropriate?


javascript,http
I've carefully read all HTTP error/status codes, still not clear which is the appropriate to return in the following scenario: The request is an Ajax request, so the handling of the error situation depends on the client javascript code, preferably it will give a notification. At server side an unexpected...

How to use a dynamic value for cache key with ActiveModel::Serializers (v0.10.0.rc1)


caching,active-model-serializers,rails-api
I am using a database-driven solution for labels and translations that I would like to cache at the serializer level. Here is my serializer. class AppLabelSerializer < ActiveModel::Serializer cache key: 'app_label', expires_in: 3.hours attributes :id, :key, :label, :label_plural def key object.app_label_dictionary.key end end The problem is that I need to...

In simple RESTful design, does PATCH imply mapping to CRUD's (ORM's) “update” and PUT to “destroy”+“create” (to replace a resource)?


database,rest,http,orm,crud
I'm trying to create a simple REST API and map it to CRUD. I have an ORM (DataMapper) which has methods like create, update and destroy. If I get it right, given a resource {a:'foo',b:'bar',c:'baz'}, performing a PUT {b:'qux'} is supposed to replace the resource and result in the same...

$http headers is not a function - angularjs


php,angularjs,http
I am posting data to Dynamics CRM via SOAP on my PHP server with cURL. After this is done it is giving the entity GUID in the form of a HTTP Response header. When attempting to access this via my angular factory and $http. My header is exposed and is...

Can I submit a form with google's recaptcha in it from my app?


http,request,authorization,captcha,recaptcha
I'm writing an app which involves letting users to share comments on a website, which has a comment form with Google's reCAPTCHA embeded. I would like to load this page via HTTP and display CAPTCHA within my app, so that user can post comments from my app. Is it easy...

PlayFramework 2.2.6. Default cache expiration


java,caching,playframework-2.2
I would like to store Java object in cache for user session. I would like to know what is default cache storage timeout. I user log in on 8.00 am I will store his user object in cache. Will it keep f.e. 10 hours until user will logout? Will be...

ASP.net HTTP Post when auto-incrementing row Id


sql,asp.net,asp.net-mvc,http
I am working in ASP.net with a Web API allowing HTTP Posts to update a mapped SQL database. I want the Id to be automatically increment by one every time a new row is inserted. The table definition is this: CREATE TABLE [dbo].[PoolTests] ( [Id] INT IDENTITY (1, 1), [SiteID]...

Which LiftResponse class is appropriate for returning an XML based file format?


xml,http,lift
I have a Lift application which generates a Gephi file on the fly. The Gehpi native format is XML based. The current plan is that the file gets downloaded and opened in Gephi on the client, without being processed/displayed in the browser. I looked through the LiftResponse subclasses and it...

Does setting beresp.ttl to 0s replace previous cache?


caching,varnish,varnish-vcl
I have this issue, I use Varnish 3.0 and I want to avoid caching errors. I'm aware that this piece of code should do it: if (beresp.status >= 500) { set beresp.saintmode = 2m; if (req.request != "POST") { set beresp.ttl = 0s; return(restart); } else { set beresp.ttl =...

How can I cache my website in the user's browser?


javascript,html5,caching
I've found many explanations about caching, some of them even have examples but, it is kind of foggy to understand it and how to use it. I've tried to use it many times, but I've failed (I want to improve speed, I want only the necessary to be loaded from...

AngularJS simple auth interceptor


ajax,angularjs,http,angular-http-interceptors
I want to pass in the headers my token each time i make a request. the way i do it now is using: $http.defaults.headers.common['auth_token'] = $localStorage.token; How could i do that to make that sent to every request, and when it throws an error it should do a $state.go('login') ...

nodejs head request isn't triggering events


node.js,http
Here's my code: var http = require('http'); var req = http.request( { host: 'example.com', method: 'HEAD', path: '/' }, function(res){ res.on('end',function(){ console.log('Ended'); }); res.on('finish',function(){ console.log('Finished'); }); res.on('close',function(){ console.log('Closed'); }); } ); req.end(); Strange thing about it is that it doesn't print anything. Takes longer than expected and exits. Is this...

Cache expires although explicitly set not to expire


c#,asp.net,caching
I have plenty of available ram (about 25 GB of free memory) and I don't want the cache to expire and I just remove and recache items when there is a change.As my website is in testing process it has 1 or 2 KBs of cached items but when I...

Yii2 : how to cache active data provider?


php,caching,yii2,dataprovider
In my PostSearch model I have this code : public function search($params) { $query = Post::find()->where(['status' => 1]); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort'=> ['defaultOrder' => ['id' => SORT_DESC]], 'pagination' => [ 'pageSize' => 10, ] ]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere([ 'id' =>...

Angular ng-repeat cache (avoid re-rendering on state change)


javascript,angularjs,performance,caching,angularjs-ng-repeat
We have huge rendering spikes with ng-repeat in Angular application. Main page shows a huge list of cover images ("::" and "track by" are in place). On first load it works acceptable. But if user changes the state (we use UI-Router) and goes back to the home page afterwards then...

How to retrieve HttpPost parameters in c#


c#,http,http-post,http-post-vars
So I know that this works: [HttpPost] public string functionthatiuse() { string id = "";//does nothing return relevantinfo; } Then I use this Chrome POST extension shown below and I have a break point in the function which is how I know it reaches it. It's literally an empty post...

what does php's header function do?


php,function,http,header,content-type
I can't find any solutions to this problem. I'm having hard time with this code. Based on what I searched: HTTP/1.1 200 OK - means that the page is good or OK. I don't understand this header function parts only. It is actually part of code. My questions are: Why...

Integrating PHP Curl


php,mysql,xml,http,php-curl
I have the code below which calls up an MySQLi and presents it in XML form in my browser. The next stage is that instead of presenting it in my browser I want to send it to another IP address using PHP Curl. Please can someone help me with the...

Django localmem size


python,django,caching
What is the default size of the local memory cache for Django. https://docs.djangoproject.com/en/1.8/ref/settings/ does not mention any. https://docs.djangoproject.com/en/1.8/topics/cache/#cache-arguments says it is 300, but the following code always returns a different value: for i in range(0, 10000): cache.set(i, i) first = cache.get(0) if first is None: print i break I have...

Purpose of Pseudo/Colon Header Fields


http,networking,http-headers,protocols,http2
As the title suggests, I'm looking for some information on the purpose of pseudo/colon header fields, i.e. I want to know why we have a second type of header field... Also - I know pseudo/colon header fields are used in http2 in place of the message and status lines (^^^the...

Django doesn't parse a custom http accept header


python,django,http,django-views,django-rest-framework
Is there any way to allow Django app to accept the custom accept header like "application/vdn.name.v1+json"? I keep getting a response like this Could not satisfy the request Accept header. I am using Django Rest Framework as well...

how make Sync or Async HTTP Post/Get in Android Studio


android,http,android-studio
I'm beginner in Android programming. I'm using Android studio to develop some simple app. At this moment I need Sync or Async HTTP Post/Get to get HTML data from Web-Service. I search this whole internet but I can't give good result. I tried to use this examples: Android Series get/post...

Handling POST request via Socket in Java


java,sockets,http,post,request
I'm trying to handle a simple POST Request in Java using a Socket. I can receive the request header and answer the request without any problem, but I certainly can not get the body of the request. I read somewhere that I'd need to open a second InputStream to achive...

Does Ruby support nonblocking HTTP requests without a third-party library?


ruby,http,asynchronous,gem,eventmachine
I am writing an API to access resources on one of my servers. Part of this API will make HTTP requests. In the name of good software design, I don't want my API to be blocking. I am fairly new to Ruby, but in Java I would provide an Asynchronous...

request.headers['HTTP_AUTH_TOKEN'] does not work for https server


ruby-on-rails,http
My code try to read the auth_token from headers in rails. def authenticate_through_header custom_header_value = request.headers['HTTP_AUTH_TOKEN'] end this does not work for a https server but works for http server. Any ideas?...

ASP.net MVC HTTP Request error with payload


asp.net,json,asp.net-mvc,http
I am creating an ASP.net MVC website with a RESTful API to a SQL database. I have implemented a controller which holds the HTTP commands. One of the commands is a POSTcommand: // POST: api/PoolTests [ResponseType(typeof(PoolTest))] public IHttpActionResult PostPoolTest(PoolTest poolTest) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.PoolTests.Add(poolTest); db.SaveChanges(); return...

Cache inconsistency - Entity not always persisted in cached Collection


java,hibernate,jpa,caching,ehcache
I'm having an issue where a Validation instance is added to a Collection on a Step instance. Declaration is as follows: Step class: @Entity @Table @Cacheable @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class Step extends AbstractEntity implements ValidatableStep { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) @JoinColumn(name = "step_id", nullable...

What does `expires -1` mean in NGINX `location` directive?


caching,nginx,cache-control
Given the sample location example below, what does -1 mean for expires? Does that mean "never expires" or "never caches"? # cache.appcache, your document html and data location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; access_log logs/static.log; } https://github.com/h5bp/server-configs-nginx/blob/master/h5bp/location/expires.conf...

Prevent Caching of PDFs in ASP Classic


pdf,caching,asp-classic
I just started to manage a website for the company I work for and it is still running with ASP Classic so I have had to learn quite a bit. Recently our managment has started to post a dynamically updated PDF to the website every few hours. The problem I...