Questions tagged [hashbang]

The hash-bang "#!" is used in AJAX-based web applications to indicate that it has web crawler support. For the shell script shebang ("#!" at the start of a file), use the [shebang] tag instead.

"Hash-bang" is a nickname for the sequence "#!" (octothorpe, exclamation mark). It is used

  • in URLs to indicate that this is a AJAX-based web application with web crawler support

  • in Unix shell scripts to identify the executable that should be used to parse this file, e.g.

    #!/bin/bash
    #!/usr/bin/perl -w
    

    to run a script with the bash shell or with Perl (in warnings mode) respectively. Use the tag for these questions instead.

153 questions
9
votes
1 answer

Navigating / scraping hashbang links with javascript (phantomjs)

I'm trying to download the HTML of a website that is almost entirely generated by JavaScript. So, I need to simulate browser access and have been playing around with PhantomJS. Problem is, the site uses hashbang URLs and I can't seem to get…
tchaymore
  • 3,508
  • 12
  • 44
  • 84
8
votes
1 answer

How to disable the #hashbang redirect on IE8 and IE9 in angularjs

I have an angularjs (v 1.2.19) application that consists of two separate html pages (or actually these are two seperate angularjs apps in one folder): index.html edit.html I am having some well-known compatibility issues on IE 8 and 9 (both do not…
tom.bujok
  • 1,502
  • 2
  • 12
  • 20
8
votes
1 answer

Uri.IsWellFormedUriString for relative Hashbang urls compatibility

In the following tests, why does (only) the last one fail? [Fact] public void IsWellFormedUriString_AbsolutNonHashTagUri_ReturnsTrue() { Assert.True(Uri.IsWellFormedUriString("http://www.RegularSite.org/Home",…
seldary
  • 5,976
  • 4
  • 37
  • 53
5
votes
4 answers

hashbang slash or no slash?

Should we do site.com/#!/blog or site.com/#!blog? I understand there's no actual difference, however as a community of webdevelopers there should still be a conventional standard so that users can easily remember the url. If there's no already…
Mark
  • 28,819
  • 33
  • 102
  • 136
5
votes
0 answers

Pinterest Rich Pins and Escaped Fragment (#!)

I have a backbonejs website that sets and unsets meta information for specific pieces of content that need to be shared out, and cooperates with a phantomjs server (example) by using the #! standard put out by google. Currently my content is…
Connor Black
  • 6,177
  • 12
  • 35
  • 67
5
votes
3 answers

history.js + Google

Let's talk about AJAX-crawling by google: Since history.js is a nice alternative to ugly hashbang urls I was wondering about one certain issue: For HTML5 browsers, nice urls are created if ajax-content is loaded and should be indexed by google. For…
sladda
  • 322
  • 3
  • 11
4
votes
1 answer

Will google index the correct URL for hashbang/escaped_fragment content

I have recently read Google's Making AJAX Applications Crawlable as I was wondering how to correctly prepare my dynamic site, which uses hashbang navigation, for SEO. I understand now that for mysite.com/#!/foobar I should serve an equivalent html…
rewolf
  • 4,631
  • 2
  • 35
  • 45
4
votes
2 answers

What's this new `#!` in URL convention?

Possible Duplicate: What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for? I noticed that some popular sites started switching to a new URL (convention?), in which a URI segment is no longer prefixed by / but rather by #!/. For…
uTubeFan
  • 6,314
  • 11
  • 38
  • 65
4
votes
2 answers

.htaccess mod_rewrite variables through redirect

Short Version: I wrote the question, and realized most people wouldn't want to read that much text. Consider the below reference, here's the TL;DR: I need to 301 redirect this url http://app.com/search/foo-bar/ to this url…
Jesse
  • 9,712
  • 9
  • 60
  • 79
4
votes
2 answers

When using Ajax History and Bookmark, is it always good to use "#!" instead of just "#"?

Facebook is doing Ajax History (Back and Forward button) and Bookmark using #! instead of just # in the URL. Is it always a good idea to do that, because I was thinking that a usual anchor could interfere with the Ajax History mechanism to trigger…
nonopolarity
  • 130,775
  • 117
  • 415
  • 675
4
votes
0 answers

MSEDGE replaceState | test if method is supported

BROWSER: Edge 12.10158 Snippet: window.history.replaceState({page: fragment},'','/demo/'+fragment); This works in all other browsers as expected (including IE 11); However, when using this in Edge i get the error: unspecified error. So naturally i…
THE AMAZING
  • 1,374
  • 2
  • 15
  • 37
4
votes
1 answer

is Pushstate inferior to Hashbangs when it comes to caching?

There are several advantages to the HTML5 Pushstate in comparison to hasbangs, in fact, Google is now encouraging the use of Pushstate. The only Pushstate disadvantage being publicly discussed is the fact that non-modern browsers do not support it.…
Hello World
  • 865
  • 7
  • 18
4
votes
2 answers

Use Backbone Router to deal with Hashbang for SEO content indexing?

My SPA employs the Backbone.js router which uses pushstate and hashed URLs as a fallback method. I intend to use Google's suggestion for making an AJAX web-app crawlable. That is, I want to index my site into static .html files generated by…
Gil Birman
  • 32,601
  • 12
  • 66
  • 107
4
votes
3 answers

Empty URL hash causes page to jump on js events

I have a gallery of photos with a next and previous button. If one of my javascript methods is broken for one reason or another when one of the buttons is clicked it will add a hash to the url i.e. www.google.com# . I know the hash can be given a…
JewrassicPark
  • 189
  • 1
  • 2
  • 12
3
votes
0 answers

Understanding Googlebots AJAX crawling

I've been through Googles documentation and countless blog posts about this subject, and depending on date and source, there seems to some conflicting information. Please shine your wisdom upon this lowly peasant, and all will be good. I'm building…
playeren
  • 87
  • 1
  • 6
1
2
3
10 11