开发者

Is there server-side code which is not cross browser compatible?

Was there a case in any server-side language where a code did not wor开发者_运维技巧k in a browser while it did work in the rest?

I am asking this because I can't imagine such a scenario because server-side code runs in the server, not in the browser but I have seen discussions where, as said, there were "server-side browser compatibility issues". I can't seem to recall where I have read it.

Thanks in advance :)


code that runs on the server only needs to be compatible with that server's environment. if say you have server code that generates javascript, however, that may not work in one or more browsers since an incompatibility may exist in the javascript code but other than that there's no reason IE would run some generic PHP or Ruby code differently than firefox or whatever.


It is called Ruby on Rails, uses REST and browsers don't understand PUT and DELETE. You have to be nonlazy and add a hidden _method input to every single web form.


The thing to remember is that (putting plugins aside) the only thing a browser understands is HTML, CSS and Javascript, so everything in your favorite server side language boils down to exactly that. So in short, you may run into compatibility issues with the HTML, CSS and Javascript your server side language generates, but you wont have any problems with server side code not executing properly depending on the browser.

If you server side code is doing strange things like trying to detect a browser or OS to do something differently, then of course that can go wrong.


It is possible, but probably not applicable to modern browsers. Old browser might not understand new version of HTTP that is enforced by the server, for example. It might not be able to decode enforced gzip compression.

However, modern browsers seems to be able to make sense from whatever is thrown at them in very similar to each other fashion.

One might also think about difference in HTML and CSS parsers in different browsers. As HTML and CSS content generated solely by the server, it might be seen as "server-side browser compatibility issues"


This can happen, if you're using a web development framework like Ruby on Rails or ASP.NET, which has dynamic components which have code that's executed on the client-side (eg. ASP.NET AJAX)


Its actually pretty common to write server-side code with branches based on a incoming http user agent, such as the case when you want to output different data for the Googlebot spider vs everyone else.

Given a truly pathological example, its wholly possible for someone to write server-side code which, for some reason or another, throws an exception when users access the page with an unexpected user agent string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜