meta

JavaScript - quickest way to extract document meta fields

I need to extract the document's "description" meta tag. The default way would be to use document.getElementsByTagName('META') and then iterate through the array - as found in: http://www.rgagnon.com/jsdetails/js-0070.html But I'm wondering if there's no other quicker, "one line of code" approach. I'm not familiar with xPath - but mayb...

Can't use an inheriting Django model's Meta class to configure a field defined in an inherited abstract model

I would like to use properties from an inheriting model's Meta class to configure a field defined in an abstract model higher up the inheritance tree: class NamedModel(models.Model): class Meta: abstract = True verbose_name = 'object' name = models.CharField("Name", max_length=200, db_index=True,...

Regex for http-equiv="refresh" meta tag

Hey, I need a regexp in PHP to find a the http-equiv="refresh" meta tag in a URL. What I need is the actual URL to follow. Now, as far as I know there are two valid ways to use this meta tag: content="0; url=urlhere" http-equiv="refresh" /> and http-equiv="refresh" content="0; url=urlhere"/> Thanks! ...

What is the proper way to tell the browser not to cache?

I have a web page that always needs to stay current. I do not want the browser to cache it. To that end, this meta tag is embedded with the page: <meta name="Expires" content="Tue, 01 Jun 1999 19:58:02 GMT"> However, some browsers seem to ignore it. Chrome is particularly bad at it, though other browsers tend to do the same thing. ...

Resource interpreted as other but transferred with MIME type text/javascript?

I keep getting "Resource interpreted as other but transferred with MIME type text/javascript.", but everything seems to be working fine. This only seems to be happening in Safari 4 on my Mac. I was advised to add "meta http-equiv="content-script-type" content="text/javascript" to the header, although that did nothing. ...

Is there a generally accepted way to add meta information to array-elements indicating how to handle them?

I am using an array which contains the results of a database-query, which is later formatted as html (for a webapplication) or as csv (for import in a spreadsheet). I want to attach information to the array-element which has some additional information about how the data of this element can be used. For instance, array-element-data... ...

Javascript Alert in META tag

Is there any way to work an alert to run when I echo a META tag which is refreshing the page? The goal is to have the page refresh and then the Alert loads. Example of current line: echo '<META HTTP-EQUIV="Refresh" Content="0"; URL="contact-test.php">'; ...

ruby logging convenience method

I would like a ruby method "show" which does this: anyobject.show the output of the call would be: anyvar => the pp string of the object Something close , but not quite is : p "any_var => #{any_var.pretty_inspect}" Since you have to type "anyvar" out to accomplish that. ...

Is there a way, using jQuery, to change the document.title after the page has loaded?

I have coded myself into a corner. Does anyone know the answer? Thanks! ...

meta http-equiv="Refresh" and NSURLConnection

Hi all, I have a URL e.g. http://www.test.com that contains a meta redirect as follows: However, - (void)connectionDidFinishLoading:(NSURLConnection *)connection just returns the initial data from the first URL. Is it now my responsibility to parse the returned HTML file and pull out the meta url attribute and call NSURLConnection a...

meta tag scraper

I'm trying to get meta tag information for each page on a particular site, preferable in a txt file. What's the simplest way of doing this? (I mean besides going to each page one by one, viewing source and then copying and pasting the tags, which would be the simplest but also wouldn't be any fun) ...

Difference between PHP and .htaccess redirect

Is there a difference between php header redirect and .htaccess redirect by the SEO of the site? 10x ...

Yii - modify response data

I need to dynamically generate title and meta tags in my application. So I need to get response object (f.e. like in symfony framework) and set corresponding data in section. How can I do this in Yii? ...

meta keywords characterset

On my site sinj.com.hr I have croatian diacritic letters which I encode to utf-8 html entities. For example, Obiteljski liječnici, na području koje pokriva sinjska ispostava Nastavnog zavoda za javno zdravstvo, danas su počeli s cijepljenjem protiv sezonske gripe. Dodajmo kako cjepivo protiv sezonske gripe nije otporno na v...

Django: Ordering by the first value of a tuple

I have a 7-tuple of tuples as such: POSSIBILITIES = ((1, "Something"), (2, "Something else"), ...) Now I have an IntegerField with choices in a model with the possibilities listed above. class Something(models.Model): class Meta: ordering = "...?" something = models.IntegerField(choices=POSSIBILITIE...

What is a programming language?

No, really. I've struggled to come up with a really great definition. Here's my take till now: A programming language is a formal language, containing syntax. Syntactical rules are used to form statements. Programming languages are used to create a set of instructions that a computer can understand. A collection of syntactical state...

should meta-tags be in utf-8 or doesn't it matter ?

Should I write the meta-tags in utf-8 format? For example, is it okay to have double-quotes in the meta-keywords like this: 19" wheels or special characters like the & sign... ? Thanks NOTE: Im using utf-8 encoding on all my pages! ...

PHP: Can CURL follow meta redirects

Hi, CURL can follow header redirects with the use of CURLOPT_FOLLOWLOCATION but is it possible to follow meta refresh redirects? Thanks ...

Programmer-friendly search engine?

Google is unfriendly to searching for verbatim strings with characters like $ and #. Is there a search engine that supports searching for verbatim strings? I'm aware of this question that was asked a while ago, but didn't get any good answers. I'm ready to put a bounty if I still can't get an answer. Of course it's entirely possible tha...

in webpage displayed after logout I saw this program, what does this indicate?

in webpage displayed after logout I saw this program, what does this indicate? I cannot post image . So I post Link http://sstatic.net/so/img/polyglot-404.png ...