browser

Why are browsers not caching these static files?

空扰寡人 提交于 2019-12-25 00:59:54
问题 Here's an example JavaScript file request/response: Request URL:http://local/index.js?time=1367958844038 Request Method:GET Status Code:200 OK Request Headers Accept:*/* Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive DNT:1 User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31 Response Headers cache-control:max-age=31536000 content-encoding

Must pass uppercase to set MSHTML element attribute (.setAttribute) correctly, why? And CaseInsensitive .setAttribute doesn't work

前提是你 提交于 2019-12-25 00:48:44
问题 Basically, I am using .setAttribute to try and add/change the target attributes value in an anchor tag (). The whole problem started because when using .setAttribute "target", "_self" the HTML is written without any double quotes surrounding the "_self", ie: <a href="..." target=_self>link</a>. The only way to get "_self" saved with double quotes around it is to ensure that there is at least one uppercase letter (or more or all uppercase) in the attribute name TARGET, so doing a .setAttribute

What's making every embedded object contentDocument “unique” even having two (or more) istances of the same object source?

坚强是说给别人听的谎言 提交于 2019-12-25 00:22:50
问题 I put several instances of the same object in an HTML page. In my case I'm dealing with SVG and I have something like this: <object data="same.svg" type="image/svg+xml"></object> <object data="same.svg" type="image/svg+xml"></object> <object data="same.svg" type="image/svg+xml"></object> Being used exactly the same SVG source for every object, I was thinking the contentDocument to be the same when compared BUT then I put the following code inside the source SVG: <script type="text/javascript"

save checked checkboxes when Page reloads [duplicate]

自作多情 提交于 2019-12-24 22:25:29
问题 This question already has answers here : localStorage how to save a checkbox (4 answers) Closed last month . For my search-engine I designed a filter using a form with checkboxes. When submitting those, the filter function works fine (using Flask for this). Yet the checkboxes which where used as a filter are unchecked again when the results are shown. Do I need to save the information in the localStorage, and how can this be done? Thanks for your help <3 This is a part of my Code for the

.NET Running 2 instances of the WebBrowser Control (separate cookie containers)

半腔热情 提交于 2019-12-24 22:20:30
问题 I'm trying to login to my website with two different accounts (admin/regular user) to test out some permissions masks - in short its a simple admin tool. Is there any way to run 2 instances of the WebBrowser control with separate cookie containers on two separate windows without having to execute your program twice? Edit: I'm using C#. 回答1: Don't think it is possible short of patching WinInet API calls. The WinInet implementation of session is one per each process pre-IE8, and LCIE shared

How to change Chrome homepage with a bat file?

送分小仙女□ 提交于 2019-12-24 21:40:07
问题 I am trying to make a bat file to change the chrome's homepage. cd %homepath%\Local Settings\Application Data\Google\Chrome\User Data\Default But I don't know the next step. 回答1: In Google chrome: chrome settings are in %USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data.ChromotingConfig.json and are a little bit encrypted. but you can do a workaround like by just pasting following javascript into the "Home Page" pref field (under your Chrome options) and it works as

Resizing an image using Javascript running in Opera Browser

无人久伴 提交于 2019-12-24 20:27:29
问题 I hope someone can help with this quirky issue I am having with the Opera Browser, I have version 11 Beta installed, but I suspect is a common problem in Opera. The website and page in question is http://www.amigaos.net/index.html. At the bottom of the body of the html I have the following code which resizes the 3 images you see on this webpage depending on width of the viewport at page load. In Safari and FireFox the code works fine, but in Opera the following lines which involve resizing

Mobile browser detection with .htaccess fails with Opera Mini

爱⌒轻易说出口 提交于 2019-12-24 17:39:05
问题 I'm having trouble figuring this one out. I'm trying to direct mobile traffic to the mobile version of a website via HTACCESS User-Agent sniffing, like so: RewriteCond %{HTTP_USER_AGENT} (android|blackberry|ipad|iphone|ipod|iemobile|mini|mobi|palmos|webos|googlebot\-mobile) [NC] RewriteCond %{HTTP_HOST} ^mobile\.mywebsite\.com$ RewriteRule ^([aA0-zZ9\-\/]*)/([^/]*)$ /index.php?page=$1&q=$2&q2=$3&setview=mobile [L,QSA] The string mini|mobi is where the Opera Mini browser should be detected.

jquery plugin history.js not working properly in html4 browsers

让人想犯罪 __ 提交于 2019-12-24 16:53:31
问题 From my homepage, let's call it mysite.com , I click a link which has this href value: /home/home.php?doc=gym . So, the entire url is mysite.com/home/home.php?doc=gym# (The browser adds the # at the end of the url, but I need that to be before the parameters in order the plugin works fine). From that page, home.php , I clicked a link that I caught its event, load some Ajax data and want to change the url mysite.com/home/home.php?doc=gym to mysite.com/home/home.php?doc=pilates . So, what I do

How to access a file name containing URL encoding through the browser?

被刻印的时光 ゝ 提交于 2019-12-24 16:46:03
问题 I created a file name called "%20%20.txt" and uploaded in my webs space. When I am trying to access above file through URL by typing "http://mysite/%20%20.txt" , it is showing an error that the file is not found. I know that "%20" will be decoded as a blank space. How is it possible to access the file through URL? 回答1: The %20 that you use in the URL will be decoded, so you are looking for the file " .txt" , but the %20 that you used to create the file is not decoded, so the actual name of